From c2f23af6151da1ccea568b4c2e025694b583d937 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 2 May 2024 18:56:16 +0000 Subject: [PATCH 1/4] feat: updated client libraries for Dataplex Catalog: removed deprecated fields, updated comments fix!: An existing field `entry` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` fix!: An existing field `display_name` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` fix!: An existing field `entry_type` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` fix!: An existing field `modify_time` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` fix!: An existing field `fully_qualified_name` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` fix!: An existing field `description` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` fix!: An existing field `relative_resource` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` docs: A comment for field `aspects` in message `.google.cloud.dataplex.v1.Entry` is changed docs: A comment for field `filter` in message `.google.cloud.dataplex.v1.ListEntriesRequest` is changed PiperOrigin-RevId: 630090353 Source-Link: https://github.com/googleapis/googleapis/commit/7ea9f2c99529458ca1a5c70f28608490bdafd3a9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7a1cca7982e5ace295aaad194267cc5d05c11d58 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFwbGV4LXYxLy5Pd2xCb3QueWFtbCIsImgiOiI3YTFjY2E3OTgyZTVhY2UyOTVhYWFkMTk0MjY3Y2M1ZDA1YzExZDU4In0= --- .../google-cloud-dataplex-v1/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-dataplex-v1/.rubocop.yml | 33 + .../google-cloud-dataplex-v1/.toys.rb | 28 + .../google-cloud-dataplex-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-dataplex-v1/CHANGELOG.md | 2 + .../google-cloud-dataplex-v1/Gemfile | 11 + .../google-cloud-dataplex-v1/LICENSE.md | 201 + .../google-cloud-dataplex-v1/README.md | 144 + .../google-cloud-dataplex-v1/Rakefile | 169 + .../gapic_metadata.json | 543 +++ .../google-cloud-dataplex-v1.gemspec | 30 + .../lib/google-cloud-dataplex-v1.rb | 21 + .../lib/google/cloud/dataplex/v1.rb | 50 + .../google/cloud/dataplex/v1/analyze_pb.rb | 62 + .../cloud/dataplex/v1/bindings_override.rb | 423 ++ .../google/cloud/dataplex/v1/catalog_pb.rb | 101 + .../cloud/dataplex/v1/catalog_service.rb | 60 + .../dataplex/v1/catalog_service/client.rb | 2797 ++++++++++++ .../v1/catalog_service/credentials.rb | 47 + .../dataplex/v1/catalog_service/operations.rb | 801 ++++ .../dataplex/v1/catalog_service/paths.rb | 128 + .../cloud/dataplex/v1/catalog_service/rest.rb | 58 + .../v1/catalog_service/rest/client.rb | 2622 +++++++++++ .../v1/catalog_service/rest/operations.rb | 895 ++++ .../v1/catalog_service/rest/service_stub.rb | 1375 ++++++ .../cloud/dataplex/v1/catalog_services_pb.rb | 91 + .../google/cloud/dataplex/v1/content_pb.rb | 60 + .../cloud/dataplex/v1/content_service.rb | 55 + .../dataplex/v1/content_service/client.rb | 1204 +++++ .../v1/content_service/credentials.rb | 47 + .../dataplex/v1/content_service/paths.rb | 73 + .../cloud/dataplex/v1/content_service/rest.rb | 53 + .../v1/content_service/rest/client.rb | 1131 +++++ .../v1/content_service/rest/service_stub.rb | 605 +++ .../cloud/dataplex/v1/content_services_pb.rb | 77 + .../cloud/dataplex/v1/data_profile_pb.rb | 60 + .../cloud/dataplex/v1/data_quality_pb.rb | 73 + .../cloud/dataplex/v1/data_scan_service.rb | 58 + .../dataplex/v1/data_scan_service/client.rb | 1329 ++++++ .../v1/data_scan_service/credentials.rb | 47 + .../v1/data_scan_service/operations.rb | 801 ++++ .../dataplex/v1/data_scan_service/paths.rb | 113 + .../dataplex/v1/data_scan_service/rest.rb | 56 + .../v1/data_scan_service/rest/client.rb | 1248 ++++++ .../v1/data_scan_service/rest/operations.rb | 895 ++++ .../v1/data_scan_service/rest/service_stub.rb | 612 +++ .../cloud/dataplex/v1/data_taxonomy_pb.rb | 77 + .../dataplex/v1/data_taxonomy_service.rb | 57 + .../v1/data_taxonomy_service/client.rb | 1966 ++++++++ .../v1/data_taxonomy_service/credentials.rb | 47 + .../v1/data_taxonomy_service/operations.rb | 801 ++++ .../v1/data_taxonomy_service/paths.rb | 109 + .../dataplex/v1/data_taxonomy_service/rest.rb | 55 + .../v1/data_taxonomy_service/rest/client.rb | 1841 ++++++++ .../data_taxonomy_service/rest/operations.rb | 895 ++++ .../rest/service_stub.rb | 960 ++++ .../dataplex/v1/data_taxonomy_services_pb.rb | 77 + .../cloud/dataplex/v1/dataplex_service.rb | 60 + .../dataplex/v1/dataplex_service/client.rb | 3950 +++++++++++++++++ .../v1/dataplex_service/credentials.rb | 47 + .../v1/dataplex_service/operations.rb | 801 ++++ .../dataplex/v1/dataplex_service/paths.rb | 178 + .../dataplex/v1/dataplex_service/rest.rb | 58 + .../v1/dataplex_service/rest/client.rb | 3700 +++++++++++++++ .../v1/dataplex_service/rest/operations.rb | 895 ++++ .../v1/dataplex_service/rest/service_stub.rb | 2028 +++++++++ .../google/cloud/dataplex/v1/datascans_pb.rb | 81 + .../dataplex/v1/datascans_services_pb.rb | 63 + .../lib/google/cloud/dataplex/v1/logs_pb.rb | 84 + .../google/cloud/dataplex/v1/metadata_pb.rb | 82 + .../cloud/dataplex/v1/metadata_service.rb | 56 + .../dataplex/v1/metadata_service/client.rb | 1313 ++++++ .../v1/metadata_service/credentials.rb | 47 + .../dataplex/v1/metadata_service/paths.rb | 102 + .../dataplex/v1/metadata_service/rest.rb | 54 + .../v1/metadata_service/rest/client.rb | 1233 +++++ .../v1/metadata_service/rest/service_stub.rb | 603 +++ .../cloud/dataplex/v1/metadata_services_pb.rb | 62 + .../google/cloud/dataplex/v1/processing_pb.rb | 50 + .../google/cloud/dataplex/v1/resources_pb.rb | 87 + .../lib/google/cloud/dataplex/v1/rest.rb | 43 + .../google/cloud/dataplex/v1/security_pb.rb | 45 + .../google/cloud/dataplex/v1/service_pb.rb | 101 + .../cloud/dataplex/v1/service_services_pb.rb | 117 + .../lib/google/cloud/dataplex/v1/tasks_pb.rb | 64 + .../lib/google/cloud/dataplex/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 399 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 222 + .../google/cloud/dataplex/v1/analyze.rb | 290 ++ .../google/cloud/dataplex/v1/catalog.rb | 1092 +++++ .../google/cloud/dataplex/v1/content.rb | 142 + .../google/cloud/dataplex/v1/data_profile.rb | 321 ++ .../google/cloud/dataplex/v1/data_quality.rb | 540 +++ .../google/cloud/dataplex/v1/data_taxonomy.rb | 565 +++ .../google/cloud/dataplex/v1/datascans.rb | 474 ++ .../google/cloud/dataplex/v1/logs.rb | 814 ++++ .../google/cloud/dataplex/v1/metadata.rb | 733 +++ .../google/cloud/dataplex/v1/processing.rb | 106 + .../google/cloud/dataplex/v1/resources.rb | 838 ++++ .../google/cloud/dataplex/v1/security.rb | 61 + .../google/cloud/dataplex/v1/service.rb | 803 ++++ .../google/cloud/dataplex/v1/tasks.rb | 435 ++ .../google/longrunning/operations.rb | 164 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/struct.rb | 96 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../google-cloud-dataplex-v1/snippets/Gemfile | 32 + .../catalog_service/create_aspect_type.rb | 54 + .../snippets/catalog_service/create_entry.rb | 47 + .../catalog_service/create_entry_group.rb | 54 + .../catalog_service/create_entry_type.rb | 54 + .../catalog_service/delete_aspect_type.rb | 54 + .../snippets/catalog_service/delete_entry.rb | 47 + .../catalog_service/delete_entry_group.rb | 54 + .../catalog_service/delete_entry_type.rb | 54 + .../catalog_service/get_aspect_type.rb | 47 + .../snippets/catalog_service/get_entry.rb | 47 + .../catalog_service/get_entry_group.rb | 47 + .../catalog_service/get_entry_type.rb | 47 + .../catalog_service/list_aspect_types.rb | 51 + .../snippets/catalog_service/list_entries.rb | 51 + .../catalog_service/list_entry_groups.rb | 51 + .../catalog_service/list_entry_types.rb | 51 + .../snippets/catalog_service/lookup_entry.rb | 47 + .../catalog_service/search_entries.rb | 51 + .../catalog_service/update_aspect_type.rb | 54 + .../snippets/catalog_service/update_entry.rb | 47 + .../catalog_service/update_entry_group.rb | 54 + .../catalog_service/update_entry_type.rb | 54 + .../content_service/create_content.rb | 47 + .../content_service/delete_content.rb | 47 + .../snippets/content_service/get_content.rb | 47 + .../content_service/get_iam_policy.rb | 47 + .../snippets/content_service/list_content.rb | 51 + .../content_service/set_iam_policy.rb | 47 + .../content_service/test_iam_permissions.rb | 47 + .../content_service/update_content.rb | 47 + .../data_scan_service/create_data_scan.rb | 54 + .../data_scan_service/delete_data_scan.rb | 54 + .../generate_data_quality_rules.rb | 47 + .../data_scan_service/get_data_scan.rb | 47 + .../data_scan_service/get_data_scan_job.rb | 47 + .../data_scan_service/list_data_scan_jobs.rb | 51 + .../data_scan_service/list_data_scans.rb | 51 + .../data_scan_service/run_data_scan.rb | 47 + .../data_scan_service/update_data_scan.rb | 54 + .../create_data_attribute.rb | 54 + .../create_data_attribute_binding.rb | 54 + .../create_data_taxonomy.rb | 54 + .../delete_data_attribute.rb | 54 + .../delete_data_attribute_binding.rb | 54 + .../delete_data_taxonomy.rb | 54 + .../get_data_attribute.rb | 47 + .../get_data_attribute_binding.rb | 47 + .../get_data_taxonomy.rb | 47 + .../list_data_attribute_bindings.rb | 51 + .../list_data_attributes.rb | 51 + .../list_data_taxonomies.rb | 51 + .../update_data_attribute.rb | 54 + .../update_data_attribute_binding.rb | 54 + .../update_data_taxonomy.rb | 54 + .../snippets/dataplex_service/cancel_job.rb | 47 + .../snippets/dataplex_service/create_asset.rb | 54 + .../dataplex_service/create_environment.rb | 54 + .../snippets/dataplex_service/create_lake.rb | 54 + .../snippets/dataplex_service/create_task.rb | 54 + .../snippets/dataplex_service/create_zone.rb | 54 + .../snippets/dataplex_service/delete_asset.rb | 54 + .../dataplex_service/delete_environment.rb | 54 + .../snippets/dataplex_service/delete_lake.rb | 54 + .../snippets/dataplex_service/delete_task.rb | 54 + .../snippets/dataplex_service/delete_zone.rb | 54 + .../snippets/dataplex_service/get_asset.rb | 47 + .../dataplex_service/get_environment.rb | 47 + .../snippets/dataplex_service/get_job.rb | 47 + .../snippets/dataplex_service/get_lake.rb | 47 + .../snippets/dataplex_service/get_task.rb | 47 + .../snippets/dataplex_service/get_zone.rb | 47 + .../dataplex_service/list_asset_actions.rb | 51 + .../snippets/dataplex_service/list_assets.rb | 51 + .../dataplex_service/list_environments.rb | 51 + .../snippets/dataplex_service/list_jobs.rb | 51 + .../dataplex_service/list_lake_actions.rb | 51 + .../snippets/dataplex_service/list_lakes.rb | 51 + .../dataplex_service/list_sessions.rb | 51 + .../snippets/dataplex_service/list_tasks.rb | 51 + .../dataplex_service/list_zone_actions.rb | 51 + .../snippets/dataplex_service/list_zones.rb | 51 + .../snippets/dataplex_service/run_task.rb | 47 + .../snippets/dataplex_service/update_asset.rb | 54 + .../dataplex_service/update_environment.rb | 54 + .../snippets/dataplex_service/update_lake.rb | 54 + .../snippets/dataplex_service/update_task.rb | 54 + .../snippets/dataplex_service/update_zone.rb | 54 + .../metadata_service/create_entity.rb | 47 + .../metadata_service/create_partition.rb | 47 + .../metadata_service/delete_entity.rb | 47 + .../metadata_service/delete_partition.rb | 47 + .../snippets/metadata_service/get_entity.rb | 47 + .../metadata_service/get_partition.rb | 47 + .../metadata_service/list_entities.rb | 51 + .../metadata_service/list_partitions.rb | 51 + .../metadata_service/update_entity.rb | 47 + ...pet_metadata_google.cloud.dataplex.v1.json | 3855 ++++++++++++++++ .../v1/catalog_service_operations_test.rb | 389 ++ .../dataplex/v1/catalog_service_paths_test.rb | 95 + .../dataplex/v1/catalog_service_rest_test.rb | 1330 ++++++ .../cloud/dataplex/v1/catalog_service_test.rb | 1538 +++++++ .../dataplex/v1/content_service_paths_test.rb | 59 + .../dataplex/v1/content_service_rest_test.rb | 535 +++ .../cloud/dataplex/v1/content_service_test.rb | 569 +++ .../v1/data_scan_service_operations_test.rb | 389 ++ .../v1/data_scan_service_paths_test.rb | 83 + .../v1/data_scan_service_rest_test.rb | 591 +++ .../dataplex/v1/data_scan_service_test.rb | 665 +++ .../data_taxonomy_service_operations_test.rb | 389 ++ .../v1/data_taxonomy_service_paths_test.rb | 83 + .../v1/data_taxonomy_service_rest_test.rb | 931 ++++ .../dataplex/v1/data_taxonomy_service_test.rb | 1080 +++++ .../v1/dataplex_service_operations_test.rb | 389 ++ .../v1/dataplex_service_paths_test.rb | 119 + .../dataplex/v1/dataplex_service_rest_test.rb | 1931 ++++++++ .../dataplex/v1/dataplex_service_test.rb | 2245 ++++++++++ .../v1/metadata_service_paths_test.rb | 71 + .../dataplex/v1/metadata_service_rest_test.rb | 592 +++ .../dataplex/v1/metadata_service_test.rb | 638 +++ .../google-cloud-dataplex-v1/test/helper.rb | 25 + 237 files changed, 74869 insertions(+) create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/README.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb 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 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json new file mode 100644 index 000000000000..70ddbcadde04 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "dataplex.googleapis.com", + "api_shortname": "dataplex", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-dataplex-v1/latest", + "distribution_name": "google-cloud-dataplex-v1", + "is_cloud": true, + "language": "ruby", + "name": "dataplex", + "name_pretty": "Dataplex V1 API", + "product_documentation": "https://cloud.google.com/dataplex/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. Note that google-cloud-dataplex-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dataplex instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/dataplex/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml b/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml new file mode 100644 index 000000000000..029e6a990334 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-dataplex-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-dataplex-v1.rb" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb b/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.yardopts b/owl-bot-staging/google-cloud-dataplex-v1/.yardopts new file mode 100644 index 000000000000..610ce5201635 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Dataplex V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..1c60fe75f8a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-dataplex-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-dataplex-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/dataplex/v1" + +client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/dataplex/v1" + +::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-dataplex-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/dataplex/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-dataplex-v1/Gemfile b/owl-bot-staging/google-cloud-dataplex-v1/Gemfile new file mode 100644 index 000000000000..95163a6d11f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md b/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/README.md b/owl-bot-staging/google-cloud-dataplex-v1/README.md new file mode 100644 index 000000000000..9ad26827a2d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/README.md @@ -0,0 +1,144 @@ +# Ruby Client for the Dataplex V1 API + +Dataplex API is used to manage the lifecycle of data lakes. + +Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Dataplex V1 API. Most users should consider using +the main client gem, +[google-cloud-dataplex](https://rubygems.org/gems/google-cloud-dataplex). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-dataplex-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/dataplex.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/dataplex/v1" + +client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new +request = ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new # (request fields as keyword arguments...) +response = client.create_lake request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-dataplex-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/dataplex/) +for general usage information. + +## Enabling Logging + +To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. +The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, +or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) +that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) +and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. + +Configuring a Ruby stdlib logger: + +```ruby +require "logger" + +module MyLogger + LOGGER = Logger.new $stderr, level: Logger::WARN + def logger + LOGGER + end +end + +# Define a gRPC module-level logger method before grpc/logconfig.rb loads. +module GRPC + extend MyLogger +end +``` + + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 2.7+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-dataplex`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-dataplex-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-dataplex`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-dataplex-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/Rakefile b/owl-bot-staging/google-cloud-dataplex-v1/Rakefile new file mode 100644 index 000000000000..7de3c4e2f174 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-dataplex-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/dataplex/v1/dataplex_service/credentials" + ::Google::Cloud::Dataplex::V1::DataplexService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-dataplex-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-dataplex-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-dataplex-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-dataplex-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-dataplex-v1" + header "google-cloud-dataplex-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-dataplex-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-dataplex-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-dataplex-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-dataplex-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json new file mode 100644 index 000000000000..99bf76d4e7ae --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json @@ -0,0 +1,543 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.dataplex.v1", + "libraryPackage": "::Google::Cloud::Dataplex::V1", + "services": { + "DataplexService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::DataplexService::Client", + "rpcs": { + "CreateLake": { + "methods": [ + "create_lake" + ] + }, + "UpdateLake": { + "methods": [ + "update_lake" + ] + }, + "DeleteLake": { + "methods": [ + "delete_lake" + ] + }, + "ListLakes": { + "methods": [ + "list_lakes" + ] + }, + "GetLake": { + "methods": [ + "get_lake" + ] + }, + "ListLakeActions": { + "methods": [ + "list_lake_actions" + ] + }, + "CreateZone": { + "methods": [ + "create_zone" + ] + }, + "UpdateZone": { + "methods": [ + "update_zone" + ] + }, + "DeleteZone": { + "methods": [ + "delete_zone" + ] + }, + "ListZones": { + "methods": [ + "list_zones" + ] + }, + "GetZone": { + "methods": [ + "get_zone" + ] + }, + "ListZoneActions": { + "methods": [ + "list_zone_actions" + ] + }, + "CreateAsset": { + "methods": [ + "create_asset" + ] + }, + "UpdateAsset": { + "methods": [ + "update_asset" + ] + }, + "DeleteAsset": { + "methods": [ + "delete_asset" + ] + }, + "ListAssets": { + "methods": [ + "list_assets" + ] + }, + "GetAsset": { + "methods": [ + "get_asset" + ] + }, + "ListAssetActions": { + "methods": [ + "list_asset_actions" + ] + }, + "CreateTask": { + "methods": [ + "create_task" + ] + }, + "UpdateTask": { + "methods": [ + "update_task" + ] + }, + "DeleteTask": { + "methods": [ + "delete_task" + ] + }, + "ListTasks": { + "methods": [ + "list_tasks" + ] + }, + "GetTask": { + "methods": [ + "get_task" + ] + }, + "ListJobs": { + "methods": [ + "list_jobs" + ] + }, + "RunTask": { + "methods": [ + "run_task" + ] + }, + "GetJob": { + "methods": [ + "get_job" + ] + }, + "CancelJob": { + "methods": [ + "cancel_job" + ] + }, + "CreateEnvironment": { + "methods": [ + "create_environment" + ] + }, + "UpdateEnvironment": { + "methods": [ + "update_environment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "delete_environment" + ] + }, + "ListEnvironments": { + "methods": [ + "list_environments" + ] + }, + "GetEnvironment": { + "methods": [ + "get_environment" + ] + }, + "ListSessions": { + "methods": [ + "list_sessions" + ] + } + } + } + } + }, + "CatalogService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::CatalogService::Client", + "rpcs": { + "CreateEntryType": { + "methods": [ + "create_entry_type" + ] + }, + "UpdateEntryType": { + "methods": [ + "update_entry_type" + ] + }, + "DeleteEntryType": { + "methods": [ + "delete_entry_type" + ] + }, + "ListEntryTypes": { + "methods": [ + "list_entry_types" + ] + }, + "GetEntryType": { + "methods": [ + "get_entry_type" + ] + }, + "CreateAspectType": { + "methods": [ + "create_aspect_type" + ] + }, + "UpdateAspectType": { + "methods": [ + "update_aspect_type" + ] + }, + "DeleteAspectType": { + "methods": [ + "delete_aspect_type" + ] + }, + "ListAspectTypes": { + "methods": [ + "list_aspect_types" + ] + }, + "GetAspectType": { + "methods": [ + "get_aspect_type" + ] + }, + "CreateEntryGroup": { + "methods": [ + "create_entry_group" + ] + }, + "UpdateEntryGroup": { + "methods": [ + "update_entry_group" + ] + }, + "DeleteEntryGroup": { + "methods": [ + "delete_entry_group" + ] + }, + "ListEntryGroups": { + "methods": [ + "list_entry_groups" + ] + }, + "GetEntryGroup": { + "methods": [ + "get_entry_group" + ] + }, + "CreateEntry": { + "methods": [ + "create_entry" + ] + }, + "UpdateEntry": { + "methods": [ + "update_entry" + ] + }, + "DeleteEntry": { + "methods": [ + "delete_entry" + ] + }, + "ListEntries": { + "methods": [ + "list_entries" + ] + }, + "GetEntry": { + "methods": [ + "get_entry" + ] + }, + "LookupEntry": { + "methods": [ + "lookup_entry" + ] + }, + "SearchEntries": { + "methods": [ + "search_entries" + ] + } + } + } + } + }, + "ContentService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::ContentService::Client", + "rpcs": { + "CreateContent": { + "methods": [ + "create_content" + ] + }, + "UpdateContent": { + "methods": [ + "update_content" + ] + }, + "DeleteContent": { + "methods": [ + "delete_content" + ] + }, + "GetContent": { + "methods": [ + "get_content" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "ListContent": { + "methods": [ + "list_content" + ] + } + } + } + } + }, + "DataTaxonomyService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client", + "rpcs": { + "CreateDataTaxonomy": { + "methods": [ + "create_data_taxonomy" + ] + }, + "UpdateDataTaxonomy": { + "methods": [ + "update_data_taxonomy" + ] + }, + "DeleteDataTaxonomy": { + "methods": [ + "delete_data_taxonomy" + ] + }, + "ListDataTaxonomies": { + "methods": [ + "list_data_taxonomies" + ] + }, + "GetDataTaxonomy": { + "methods": [ + "get_data_taxonomy" + ] + }, + "CreateDataAttributeBinding": { + "methods": [ + "create_data_attribute_binding" + ] + }, + "UpdateDataAttributeBinding": { + "methods": [ + "update_data_attribute_binding" + ] + }, + "DeleteDataAttributeBinding": { + "methods": [ + "delete_data_attribute_binding" + ] + }, + "ListDataAttributeBindings": { + "methods": [ + "list_data_attribute_bindings" + ] + }, + "GetDataAttributeBinding": { + "methods": [ + "get_data_attribute_binding" + ] + }, + "CreateDataAttribute": { + "methods": [ + "create_data_attribute" + ] + }, + "UpdateDataAttribute": { + "methods": [ + "update_data_attribute" + ] + }, + "DeleteDataAttribute": { + "methods": [ + "delete_data_attribute" + ] + }, + "ListDataAttributes": { + "methods": [ + "list_data_attributes" + ] + }, + "GetDataAttribute": { + "methods": [ + "get_data_attribute" + ] + } + } + } + } + }, + "DataScanService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::DataScanService::Client", + "rpcs": { + "CreateDataScan": { + "methods": [ + "create_data_scan" + ] + }, + "UpdateDataScan": { + "methods": [ + "update_data_scan" + ] + }, + "DeleteDataScan": { + "methods": [ + "delete_data_scan" + ] + }, + "GetDataScan": { + "methods": [ + "get_data_scan" + ] + }, + "ListDataScans": { + "methods": [ + "list_data_scans" + ] + }, + "RunDataScan": { + "methods": [ + "run_data_scan" + ] + }, + "GetDataScanJob": { + "methods": [ + "get_data_scan_job" + ] + }, + "ListDataScanJobs": { + "methods": [ + "list_data_scan_jobs" + ] + }, + "GenerateDataQualityRules": { + "methods": [ + "generate_data_quality_rules" + ] + } + } + } + } + }, + "MetadataService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::MetadataService::Client", + "rpcs": { + "CreateEntity": { + "methods": [ + "create_entity" + ] + }, + "UpdateEntity": { + "methods": [ + "update_entity" + ] + }, + "DeleteEntity": { + "methods": [ + "delete_entity" + ] + }, + "GetEntity": { + "methods": [ + "get_entity" + ] + }, + "ListEntities": { + "methods": [ + "list_entities" + ] + }, + "CreatePartition": { + "methods": [ + "create_partition" + ] + }, + "DeletePartition": { + "methods": [ + "delete_partition" + ] + }, + "GetPartition": { + "methods": [ + "get_partition" + ] + }, + "ListPartitions": { + "methods": [ + "list_partitions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec b/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec new file mode 100644 index 000000000000..fa222f4abb34 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/dataplex/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-dataplex-v1" + gem.version = Google::Cloud::Dataplex::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. Note that google-cloud-dataplex-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dataplex instead. See the readme for more details." + gem.summary = "Dataplex API is used to manage the lifecycle of data lakes." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", ">= 0.7", "< 2.a" + gem.add_dependency "google-iam-v1", ">= 0.7", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb new file mode 100644 index 000000000000..6a853eb65247 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/dataplex/v1" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb new file mode 100644 index 000000000000..a3347b7c69df --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/dataplex_service" +require "google/cloud/dataplex/v1/catalog_service" +require "google/cloud/dataplex/v1/content_service" +require "google/cloud/dataplex/v1/data_taxonomy_service" +require "google/cloud/dataplex/v1/data_scan_service" +require "google/cloud/dataplex/v1/metadata_service" +require "google/cloud/dataplex/v1/version" + +module Google + module Cloud + module Dataplex + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/dataplex/v1" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/dataplex/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb new file mode 100644 index 000000000000..86e65c604fd7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/analyze.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/resources_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/dataplex/v1/analyze.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\r\n\x0b\x45nvironment\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#dataplex.googleapis.com/Environment\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x06 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.Environment.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12Z\n\x13infrastructure_spec\x18\x64 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Environment.InfrastructureSpecB\x03\xe0\x41\x02\x12L\n\x0csession_spec\x18\x65 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Environment.SessionSpecB\x03\xe0\x41\x01\x12P\n\x0esession_status\x18\x66 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.Environment.SessionStatusB\x03\xe0\x41\x03\x12H\n\tendpoints\x18\xc8\x01 \x01(\x0b\x32/.google.cloud.dataplex.v1.Environment.EndpointsB\x03\xe0\x41\x03\x1a\xe5\x04\n\x12InfrastructureSpec\x12\x61\n\x07\x63ompute\x18\x32 \x01(\x0b\x32I.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResourcesB\x03\xe0\x41\x01H\x00\x12`\n\x08os_image\x18\x64 \x01(\x0b\x32G.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntimeB\x03\xe0\x41\x02H\x01\x1a\x63\n\x10\x43omputeResources\x12\x19\n\x0c\x64isk_size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\nnode_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1b\n\x0emax_node_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x1a\x8c\x02\n\x0eOsImageRuntime\x12\x1a\n\rimage_version\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0ejava_libraries\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fpython_packages\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12p\n\nproperties\x18\x04 \x03(\x0b\x32W.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.PropertiesEntryB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0b\n\tresourcesB\t\n\x07runtime\x1aj\n\x0bSessionSpec\x12\x39\n\x11max_idle_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12 \n\x13\x65nable_fast_startup\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a$\n\rSessionStatus\x12\x13\n\x06\x61\x63tive\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x35\n\tEndpoints\x12\x16\n\tnotebooks\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03sql\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:y\xea\x41v\n#dataplex.googleapis.com/Environment\x12Oprojects/{project}/locations/{location}/lakes/{lake}/environments/{environment}\"\xa6\x07\n\x07\x43ontent\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Content\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06labels\x18\x06 \x03(\x0b\x32-.google.cloud.dataplex.v1.Content.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\tdata_text\x18\t \x01(\tB\x03\xe0\x41\x02H\x00\x12\x41\n\nsql_script\x18\x64 \x01(\x0b\x32+.google.cloud.dataplex.v1.Content.SqlScriptH\x01\x12>\n\x08notebook\x18\x65 \x01(\x0b\x32*.google.cloud.dataplex.v1.Content.NotebookH\x01\x1a\x91\x01\n\tSqlScript\x12L\n\x06\x65ngine\x18\x01 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.Content.SqlScript.QueryEngineB\x03\xe0\x41\x02\"6\n\x0bQueryEngine\x12\x1c\n\x18QUERY_ENGINE_UNSPECIFIED\x10\x00\x12\t\n\x05SPARK\x10\x02\x1a\x93\x01\n\x08Notebook\x12O\n\x0bkernel_type\x18\x01 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.Content.Notebook.KernelTypeB\x03\xe0\x41\x02\"6\n\nKernelType\x12\x1b\n\x17KERNEL_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PYTHON3\x10\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:l\xea\x41i\n\x1f\x64\x61taplex.googleapis.com/Content\x12\x46projects/{project}/locations/{location}/lakes/{lake}/content/{content}B\x06\n\x04\x64\x61taB\t\n\x07\x63ontent\"\xcd\x02\n\x07Session\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Session\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\x05state\x18\x04 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03:\x89\x01\xea\x41\x85\x01\n\x1f\x64\x61taplex.googleapis.com/Session\x12\x62projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}Bh\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x41nalyzeProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment").msgclass + Environment::InfrastructureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec").msgclass + Environment::InfrastructureSpec::ComputeResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources").msgclass + Environment::InfrastructureSpec::OsImageRuntime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime").msgclass + Environment::SessionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.SessionSpec").msgclass + Environment::SessionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.SessionStatus").msgclass + Environment::Endpoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.Endpoints").msgclass + Content = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content").msgclass + Content::SqlScript = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.SqlScript").msgclass + Content::SqlScript::QueryEngine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.SqlScript.QueryEngine").enummodule + Content::Notebook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.Notebook").msgclass + Content::Notebook::KernelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.Notebook.KernelType").enummodule + Session = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Session").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb new file mode 100644 index 000000000000..2760d6770459 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb @@ -0,0 +1,423 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/config" + +module Google + module Cloud + module Dataplex + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/dataplex/v1/rest" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = Configuration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + + ## + # @private + # Configuration class for the google.cloud.dataplex.v1 package. + # + # This class contains common configuration for all services + # of the google.cloud.dataplex.v1 package. + # + # This configuration is for internal use of the client library classes, + # and it is not intended that the end-users will read or change it. + # + class Configuration + extend ::Gapic::Config + + # @private + # Overrides for http bindings for the RPC of the mixins for this package. + # Services in this package should use these when creating clients for the mixin services. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb new file mode 100644 index 000000000000..a3ce27a01b7e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/catalog.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/service_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/dataplex/v1/catalog.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd3\r\n\nAspectType\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.AspectType.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12N\n\rauthorization\x18\x34 \x01(\x0b\x32\x32.google.cloud.dataplex.v1.AspectType.AuthorizationB\x03\xe0\x41\x05\x12U\n\x11metadata_template\x18\x35 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x02\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a\xa4\x07\n\x10MetadataTemplate\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12Q\n\rrecord_fields\x18\x06 \x03(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12Y\n\x0b\x65num_values\x18\x08 \x03(\x0b\x32?.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValueB\x03\xe0\x41\x01\x12M\n\tmap_items\x18\n \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12O\n\x0b\x61rray_items\x18\x0b \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12\x14\n\x07type_id\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08type_ref\x18\r \x01(\tB\x03\xe0\x41\x01\x12[\n\x0b\x63onstraints\x18\x32 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.ConstraintsB\x03\xe0\x41\x01\x12[\n\x0b\x61nnotations\x18\x33 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.AnnotationsB\x03\xe0\x41\x01\x1aK\n\tEnumValue\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ndeprecated\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0b\x43onstraints\x12\x15\n\x08required\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xad\x01\n\x0b\x41nnotations\x12\x17\n\ndeprecated\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdisplay_order\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bstring_type\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rstring_values\x18\x07 \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/AspectType\x12\x41projects/{project}/locations/{location}/aspectTypes/{aspect_type}*\x0b\x61spectTypes2\naspectType\"\xcd\x04\n\nEntryGroup\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.EntryGroup.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/EntryGroup\x12\x41projects/{project}/locations/{location}/entryGroups/{entry_group}*\x0b\x65ntryGroups2\nentryGroup\"\xdc\x06\n\tEntryType\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x06labels\x18\x07 \x03(\x0b\x32/.google.cloud.dataplex.v1.EntryType.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0ctype_aliases\x18\t \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08platform\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06system\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12H\n\x10required_aspects\x18\x32 \x03(\x0b\x32..google.cloud.dataplex.v1.EntryType.AspectInfo\x12M\n\rauthorization\x18\x33 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.EntryType.AuthorizationB\x03\xe0\x41\x05\x1a\x43\n\nAspectInfo\x12\x35\n\x04type\x18\x01 \x01(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:~\xea\x41{\n!dataplex.googleapis.com/EntryType\x12?projects/{project}/locations/{location}/entryTypes/{entry_type}*\nentryTypes2\tentryType\"\x91\x02\n\x06\x41spect\x12\x18\n\x0b\x61spect_type\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12*\n\x04\x64\x61ta\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\x12\x42\n\raspect_source\x18\t \x01(\x0b\x32&.google.cloud.dataplex.v1.AspectSourceB\x03\xe0\x41\x01\"p\n\x0c\x41spectSource\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc4\x04\n\x05\x45ntry\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\nentry_type\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07\x61spects\x18\t \x03(\x0b\x32,.google.cloud.dataplex.v1.Entry.AspectsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0cparent_entry\x18\n \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05\x12!\n\x14\x66ully_qualified_name\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12@\n\x0c\x65ntry_source\x18\x0f \x01(\x0b\x32%.google.cloud.dataplex.v1.EntrySourceB\x03\xe0\x41\x01\x1aP\n\x0c\x41spectsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .google.cloud.dataplex.v1.Aspect:\x02\x38\x01:\x86\x01\xea\x41\x82\x01\n\x1d\x64\x61taplex.googleapis.com/Entry\x12Qprojects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}*\x07\x65ntries2\x05\x65ntry\"\xba\x03\n\x0b\x45ntrySource\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x0e\n\x06system\x18\x02 \x01(\t\x12\x10\n\x08platform\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x41\n\x06labels\x18\x07 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.EntrySource.LabelsEntry\x12\x46\n\tancestors\x18\t \x03(\x0b\x32..google.cloud.dataplex.v1.EntrySource.AncestorB\x03\xe0\x41\x05\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x30\n\x08\x41ncestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xcd\x01\n\x17\x43reateEntryGroupRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x65ntry_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x65ntry_group\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateEntryGroupRequest\x12>\n\x0b\x65ntry_group\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListEntryGroupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListEntryGroupsResponse\x12:\n\x0c\x65ntry_groups\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.EntryGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\"\xc9\x01\n\x16\x43reateEntryTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1a\n\rentry_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\nentry_type\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x16UpdateEntryTypeRequest\x12<\n\nentry_type\x18\x01 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"d\n\x16\x44\x65leteEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n\x15ListEntryTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x16ListEntryTypesResponse\x12\x38\n\x0b\x65ntry_types\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.EntryType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"N\n\x13GetEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\"\xcd\x01\n\x17\x43reateAspectTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x61spect_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x61spect_type\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateAspectTypeRequest\x12>\n\x0b\x61spect_type\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListAspectTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListAspectTypesResponse\x12:\n\x0c\x61spect_types\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.AspectType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\"\x9c\x01\n\x12\x43reateEntryRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x15\n\x08\x65ntry_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x05\x65ntry\x18\x03 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\"\xda\x01\n\x12UpdateEntryRequest\x12\x33\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16\x64\x65lete_missing_aspects\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x61spect_keys\x18\x05 \x03(\tB\x03\xe0\x41\x01\"I\n\x12\x44\x65leteEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\x96\x01\n\x12ListEntriesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"`\n\x13ListEntriesResponse\x12\x30\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n\x0fGetEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\"\xc4\x01\n\x12LookupEntryRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x34\n\x05\x65ntry\x18\x05 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\x99\x01\n\x14SearchEntriesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05scope\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\xf6\x01\n\x13SearchEntriesResult\x12\x17\n\x0flinked_resource\x18\x08 \x01(\t\x12\x37\n\x0e\x64\x61taplex_entry\x18\t \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12H\n\x08snippets\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.SearchEntriesResult.Snippets\x1a\x43\n\x08Snippets\x12\x37\n\x0e\x64\x61taplex_entry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\"\x99\x01\n\x15SearchEntriesResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32-.google.cloud.dataplex.v1.SearchEntriesResult\x12\x12\n\ntotal_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x13\n\x0bunreachable\x18\x04 \x03(\t*Q\n\tEntryView\x12\x1a\n\x16\x45NTRY_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\x12\x07\n\x03\x41LL\x10\x04*p\n\x0eTransferStatus\x12\x1f\n\x1bTRANSFER_STATUS_UNSPECIFIED\x10\x00\x12\x1c\n\x18TRANSFER_STATUS_MIGRATED\x10\x01\x12\x1f\n\x1bTRANSFER_STATUS_TRANSFERRED\x10\x02\x32\x82#\n\x0e\x43\x61talogService\x12\xea\x01\n\x0f\x43reateEntryType\x12\x30.google.cloud.dataplex.v1.CreateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x1fparent,entry_type,entry_type_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/entryTypes:\nentry_type\x12\xec\x01\n\x0fUpdateEntryType\x12\x30.google.cloud.dataplex.v1.UpdateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x16\x65ntry_type,update_mask\x82\xd3\xe4\x93\x02G29/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}:\nentry_type\x12\xce\x01\n\x0f\x44\x65leteEntryType\x12\x30.google.cloud.dataplex.v1.DeleteEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xb4\x01\n\x0eListEntryTypes\x12/.google.cloud.dataplex.v1.ListEntryTypesRequest\x1a\x30.google.cloud.dataplex.v1.ListEntryTypesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/entryTypes\x12\xa1\x01\n\x0cGetEntryType\x12-.google.cloud.dataplex.v1.GetEntryTypeRequest\x1a#.google.cloud.dataplex.v1.EntryType\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xf1\x01\n\x10\x43reateAspectType\x12\x31.google.cloud.dataplex.v1.CreateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41!parent,aspect_type,aspect_type_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/aspectTypes:\x0b\x61spect_type\x12\xf3\x01\n\x10UpdateAspectType\x12\x31.google.cloud.dataplex.v1.UpdateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41\x17\x61spect_type,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}:\x0b\x61spect_type\x12\xd1\x01\n\x10\x44\x65leteAspectType\x12\x31.google.cloud.dataplex.v1.DeleteAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xb8\x01\n\x0fListAspectTypes\x12\x30.google.cloud.dataplex.v1.ListAspectTypesRequest\x1a\x31.google.cloud.dataplex.v1.ListAspectTypesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/aspectTypes\x12\xa5\x01\n\rGetAspectType\x12..google.cloud.dataplex.v1.GetAspectTypeRequest\x1a$.google.cloud.dataplex.v1.AspectType\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xf1\x01\n\x10\x43reateEntryGroup\x12\x31.google.cloud.dataplex.v1.CreateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41!parent,entry_group,entry_group_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/entryGroups:\x0b\x65ntry_group\x12\xf3\x01\n\x10UpdateEntryGroup\x12\x31.google.cloud.dataplex.v1.UpdateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41\x17\x65ntry_group,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}:\x0b\x65ntry_group\x12\xd1\x01\n\x10\x44\x65leteEntryGroup\x12\x31.google.cloud.dataplex.v1.DeleteEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xb8\x01\n\x0fListEntryGroups\x12\x30.google.cloud.dataplex.v1.ListEntryGroupsRequest\x1a\x31.google.cloud.dataplex.v1.ListEntryGroupsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/entryGroups\x12\xa5\x01\n\rGetEntryGroup\x12..google.cloud.dataplex.v1.GetEntryGroupRequest\x1a$.google.cloud.dataplex.v1.EntryGroup\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xbe\x01\n\x0b\x43reateEntry\x12,.google.cloud.dataplex.v1.CreateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"`\xda\x41\x15parent,entry,entry_id\x82\xd3\xe4\x93\x02\x42\"9/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:\x05\x65ntry\x12\xc1\x01\n\x0bUpdateEntry\x12,.google.cloud.dataplex.v1.UpdateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"c\xda\x41\x11\x65ntry,update_mask\x82\xd3\xe4\x93\x02I2@/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/**}:\x05\x65ntry\x12\xa7\x01\n\x0b\x44\x65leteEntry\x12,.google.cloud.dataplex.v1.DeleteEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\xb6\x01\n\x0bListEntries\x12,.google.cloud.dataplex.v1.ListEntriesRequest\x1a-.google.cloud.dataplex.v1.ListEntriesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/entryGroups/*}/entries\x12\xa1\x01\n\x08GetEntry\x12).google.cloud.dataplex.v1.GetEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\x93\x01\n\x0bLookupEntry\x12,.google.cloud.dataplex.v1.LookupEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*}:lookupEntry\x12\xb6\x01\n\rSearchEntries\x12..google.cloud.dataplex.v1.SearchEntriesRequest\x1a/.google.cloud.dataplex.v1.SearchEntriesResponse\"D\xda\x41\nname,query\x82\xd3\xe4\x93\x02\x31\"//v1/{name=projects/*/locations/*}:searchEntries\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbc\x01\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x43\x61talogProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xaa\x02\x18Google.Cloud.Dataplex.V1\xca\x02\x18Google\\Cloud\\Dataplex\\V1\xea\x02\x1bGoogle::Cloud::Dataplex::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Struct", "google/protobuf/struct.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + AspectType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType").msgclass + AspectType::Authorization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.Authorization").msgclass + AspectType::MetadataTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate").msgclass + AspectType::MetadataTemplate::EnumValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue").msgclass + AspectType::MetadataTemplate::Constraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints").msgclass + AspectType::MetadataTemplate::Annotations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations").msgclass + EntryGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryGroup").msgclass + EntryType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryType").msgclass + EntryType::AspectInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryType.AspectInfo").msgclass + EntryType::Authorization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryType.Authorization").msgclass + Aspect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Aspect").msgclass + AspectSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectSource").msgclass + Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Entry").msgclass + EntrySource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntrySource").msgclass + EntrySource::Ancestor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntrySource.Ancestor").msgclass + CreateEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEntryGroupRequest").msgclass + UpdateEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEntryGroupRequest").msgclass + DeleteEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEntryGroupRequest").msgclass + ListEntryGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryGroupsRequest").msgclass + ListEntryGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryGroupsResponse").msgclass + GetEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEntryGroupRequest").msgclass + CreateEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEntryTypeRequest").msgclass + UpdateEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEntryTypeRequest").msgclass + DeleteEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEntryTypeRequest").msgclass + ListEntryTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryTypesRequest").msgclass + ListEntryTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryTypesResponse").msgclass + GetEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEntryTypeRequest").msgclass + CreateAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateAspectTypeRequest").msgclass + UpdateAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateAspectTypeRequest").msgclass + DeleteAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteAspectTypeRequest").msgclass + ListAspectTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAspectTypesRequest").msgclass + ListAspectTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAspectTypesResponse").msgclass + GetAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetAspectTypeRequest").msgclass + CreateEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEntryRequest").msgclass + UpdateEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEntryRequest").msgclass + DeleteEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEntryRequest").msgclass + ListEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntriesRequest").msgclass + ListEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntriesResponse").msgclass + GetEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEntryRequest").msgclass + LookupEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.LookupEntryRequest").msgclass + SearchEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesRequest").msgclass + SearchEntriesResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesResult").msgclass + SearchEntriesResult::Snippets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesResult.Snippets").msgclass + SearchEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesResponse").msgclass + EntryView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryView").enummodule + TransferStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.TransferStatus").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb new file mode 100644 index 000000000000..23ba3815dfd4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +require "google/cloud/dataplex/v1/catalog_service/credentials" +require "google/cloud/dataplex/v1/catalog_service/paths" +require "google/cloud/dataplex/v1/catalog_service/operations" +require "google/cloud/dataplex/v1/catalog_service/client" +require "google/cloud/dataplex/v1/catalog_service/rest" + +module Google + module Cloud + module Dataplex + module 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. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/catalog_service" + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dataplex/v1/catalog_service/rest" + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + module CatalogService + end + end + end + end +end + +helper_path = ::File.join __dir__, "catalog_service", "helpers.rb" +require "google/cloud/dataplex/v1/catalog_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb new file mode 100644 index 000000000000..7a7b990936b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb @@ -0,0 +1,2797 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/catalog_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + ## + # Client for the CatalogService service. + # + # 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. + # + class Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :catalog_service_stub + + ## + # Configure the CatalogService Client class. + # + # See {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CatalogService clients + # ::Google::Cloud::Dataplex::V1::CatalogService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_entry_type.timeout = 60.0 + + default_config.rpcs.update_entry_type.timeout = 60.0 + + default_config.rpcs.delete_entry_type.timeout = 60.0 + + default_config.rpcs.list_entry_types.timeout = 60.0 + default_config.rpcs.list_entry_types.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry_type.timeout = 60.0 + default_config.rpcs.get_entry_type.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_aspect_type.timeout = 60.0 + + default_config.rpcs.update_aspect_type.timeout = 60.0 + + default_config.rpcs.delete_aspect_type.timeout = 60.0 + + default_config.rpcs.list_aspect_types.timeout = 60.0 + default_config.rpcs.list_aspect_types.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_aspect_type.timeout = 60.0 + default_config.rpcs.get_aspect_type.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_entry_group.timeout = 60.0 + + default_config.rpcs.update_entry_group.timeout = 60.0 + + default_config.rpcs.delete_entry_group.timeout = 60.0 + + default_config.rpcs.list_entry_groups.timeout = 60.0 + default_config.rpcs.list_entry_groups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry_group.timeout = 60.0 + default_config.rpcs.get_entry_group.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_entry.timeout = 60.0 + + default_config.rpcs.update_entry.timeout = 60.0 + default_config.rpcs.update_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.delete_entry.timeout = 60.0 + + default_config.rpcs.list_entries.timeout = 20.0 + default_config.rpcs.list_entries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry.timeout = 20.0 + default_config.rpcs.get_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.lookup_entry.timeout = 20.0 + default_config.rpcs.lookup_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.search_entries.timeout = 60.0 + default_config.rpcs.search_entries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CatalogService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @catalog_service_stub.universe_domain + end + + ## + # Create a new CatalogService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CatalogService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/catalog_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @catalog_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::CatalogService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @catalog_service_stub.endpoint + config.universe_domain = @catalog_service_stub.universe_domain + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @catalog_service_stub.endpoint + config.universe_domain = @catalog_service_stub.universe_domain + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::CatalogService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Creates an EntryType + # + # @overload create_entry_type(request, options = nil) + # Pass arguments to `create_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_entry_type(parent: nil, entry_type_id: nil, entry_type: nil, validate_only: nil) + # Pass arguments to `create_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the EntryType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a GCP region. + # @param entry_type_id [::String] + # Required. EntryType identifier. + # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] + # Required. EntryType Resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new + # + # # Call the create_entry_type method. + # result = client.create_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_entry_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :create_entry_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a EntryType resource. + # + # @overload update_entry_type(request, options = nil) + # Pass arguments to `update_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_entry_type(entry_type: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] + # Required. EntryType Resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new + # + # # Call the update_entry_type method. + # result = client.update_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.entry_type&.name + header_params["entry_type.name"] = request.entry_type.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_entry_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :update_entry_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a EntryType resource. + # + # @overload delete_entry_type(request, options = nil) + # Pass arguments to `delete_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_entry_type(name: nil, etag: nil) + # Pass arguments to `delete_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryTypeRequest method returns an ABORTED error response + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new + # + # # Call the delete_entry_type method. + # result = client.delete_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_entry_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :delete_entry_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists EntryType resources in a project and location. + # + # @overload list_entry_types(request, options = nil) + # Pass arguments to `list_entry_types` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntryTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_entry_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_entry_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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 order_by [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new + # + # # Call the list_entry_types method. + # result = client.list_entry_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. + # p item + # end + # + def list_entry_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_entry_types.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_entry_types.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_entry_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :list_entry_types, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entry_types, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a EntryType resource. + # + # @overload get_entry_type(request, options = nil) + # Pass arguments to `get_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_entry_type(name: nil) + # Pass arguments to `get_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryType] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new + # + # # Call the get_entry_type method. + # result = client.get_entry_type request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. + # p result + # + def get_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_entry_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :get_entry_type, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an AspectType + # + # @overload create_aspect_type(request, options = nil) + # Pass arguments to `create_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_aspect_type(parent: nil, aspect_type_id: nil, aspect_type: nil, validate_only: nil) + # Pass arguments to `create_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the AspectType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a GCP region. + # @param aspect_type_id [::String] + # Required. AspectType identifier. + # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] + # Required. AspectType Resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new + # + # # Call the create_aspect_type method. + # result = client.create_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_aspect_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :create_aspect_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a AspectType resource. + # + # @overload update_aspect_type(request, options = nil) + # Pass arguments to `update_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_aspect_type(aspect_type: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] + # Required. AspectType Resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new + # + # # Call the update_aspect_type method. + # result = client.update_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.aspect_type&.name + header_params["aspect_type.name"] = request.aspect_type.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_aspect_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :update_aspect_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a AspectType resource. + # + # @overload delete_aspect_type(request, options = nil) + # Pass arguments to `delete_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_aspect_type(name: nil, etag: nil) + # Pass arguments to `delete_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteAspectTypeRequest method returns an ABORTED error response + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new + # + # # Call the delete_aspect_type method. + # result = client.delete_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_aspect_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :delete_aspect_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists AspectType resources in a project and location. + # + # @overload list_aspect_types(request, options = nil) + # Pass arguments to `list_aspect_types` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAspectTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_aspect_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_aspect_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # 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. + # @param page_token [::String] + # 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. + # @param filter [::String] + # 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 order_by [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new + # + # # Call the list_aspect_types method. + # result = client.list_aspect_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. + # p item + # end + # + def list_aspect_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_aspect_types.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_aspect_types.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_aspect_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :list_aspect_types, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_aspect_types, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a AspectType resource. + # + # @overload get_aspect_type(request, options = nil) + # Pass arguments to `get_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_aspect_type(name: nil) + # Pass arguments to `get_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::AspectType] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new + # + # # Call the get_aspect_type method. + # result = client.get_aspect_type request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. + # p result + # + def get_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_aspect_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :get_aspect_type, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an EntryGroup + # + # @overload create_entry_group(request, options = nil) + # Pass arguments to `create_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil, validate_only: nil) + # Pass arguments to `create_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 entry_group_id [::String] + # Required. EntryGroup identifier. + # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] + # Required. EntryGroup Resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new + # + # # Call the create_entry_group method. + # result = client.create_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_entry_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :create_entry_group, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a EntryGroup resource. + # + # @overload update_entry_group(request, options = nil) + # Pass arguments to `update_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_entry_group(entry_group: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] + # Required. EntryGroup Resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new + # + # # Call the update_entry_group method. + # result = client.update_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.entry_group&.name + header_params["entry_group.name"] = request.entry_group.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_entry_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :update_entry_group, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a EntryGroup resource. + # + # @overload delete_entry_group(request, options = nil) + # Pass arguments to `delete_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_entry_group(name: nil, etag: nil) + # Pass arguments to `delete_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryGroupRequest method returns an ABORTED error response + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new + # + # # Call the delete_entry_group method. + # result = client.delete_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_entry_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :delete_entry_group, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists EntryGroup resources in a project and location. + # + # @overload list_entry_groups(request, options = nil) + # Pass arguments to `list_entry_groups` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_entry_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_entry_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # 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. + # @param page_token [::String] + # 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. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new + # + # # Call the list_entry_groups method. + # result = client.list_entry_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. + # p item + # end + # + def list_entry_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_entry_groups.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_entry_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_entry_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :list_entry_groups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entry_groups, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a EntryGroup resource. + # + # @overload get_entry_group(request, options = nil) + # Pass arguments to `get_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_entry_group(name: nil) + # Pass arguments to `get_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryGroup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new + # + # # Call the get_entry_group method. + # result = client.get_entry_group request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. + # p result + # + def get_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_entry_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :get_entry_group, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an Entry. + # + # @overload create_entry(request, options = nil) + # Pass arguments to `create_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_entry(parent: nil, entry_id: nil, entry: nil) + # Pass arguments to `create_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @param entry_id [::String] + # 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 + # `//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 + # Cloud. + # + # The maximum size of the field is 4000 characters. + # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] + # Required. Entry resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new + # + # # Call the create_entry method. + # result = client.create_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def create_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :create_entry, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an Entry. + # + # @overload update_entry(request, options = nil) + # Pass arguments to `update_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_entry(entry: nil, update_mask: nil, allow_missing: nil, delete_missing_aspects: nil, aspect_keys: nil) + # Pass arguments to `update_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] + # Required. Entry resource. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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. + # @param allow_missing [::Boolean] + # Optional. If set to true and the entry does not exist, it will be created. + # @param delete_missing_aspects [::Boolean] + # 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. + # @param aspect_keys [::Array<::String>] + # 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 + # `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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new + # + # # Call the update_entry method. + # result = client.update_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def update_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.entry&.name + header_params["entry.name"] = request.entry.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :update_entry, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an Entry. + # + # @overload delete_entry(request, options = nil) + # Pass arguments to `delete_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_entry(name: nil) + # Pass arguments to `delete_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new + # + # # Call the delete_entry method. + # result = client.delete_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def delete_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :delete_entry, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists entries within an entry group. + # + # @overload list_entries(request, options = nil) + # Pass arguments to `list_entries` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_entries(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_entries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @param page_size [::Integer] + # @param page_token [::String] + # Optional. The pagination token returned by a previous request. + # @param filter [::String] + # 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" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new + # + # # Call the list_entries method. + # result = client.list_entries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. + # p item + # end + # + def list_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_entries.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_entries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :list_entries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entries, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a single entry. + # + # @overload get_entry(request, options = nil) + # Pass arguments to `get_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_entry(name: nil, view: nil, aspect_types: nil, paths: nil) + # Pass arguments to `get_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @param view [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View for controlling which parts of an entry are to be returned. + # @param aspect_types [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # Only works if the CUSTOM view is selected. + # @param paths [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. Only works if the CUSTOM view is selected. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryRequest.new + # + # # Call the get_entry method. + # result = client.get_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def get_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :get_entry, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Looks up a single entry. + # + # @overload lookup_entry(request, options = nil) + # Pass arguments to `lookup_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::LookupEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload lookup_entry(name: nil, view: nil, aspect_types: nil, paths: nil, entry: nil) + # Pass arguments to `lookup_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/{location}`. + # @param view [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View for controlling which parts of an entry are to be returned. + # @param aspect_types [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # Only works if the CUSTOM view is selected. + # @param paths [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. Only works if the CUSTOM view is selected. + # @param entry [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new + # + # # Call the lookup_entry method. + # result = client.lookup_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def lookup_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.lookup_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.lookup_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lookup_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :lookup_entry, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Searches for entries matching given query and scope. + # + # @overload search_entries(request, options = nil) + # Pass arguments to `search_entries` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::SearchEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil) + # Pass arguments to `search_entries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/{location}`. + # @param query [::String] + # Required. The query against which entries in scope should be matched. + # @param page_size [::Integer] + # Optional. Pagination. + # @param page_token [::String] + # @param order_by [::String] + # Optional. Ordering of the results. Supported options to be added later. + # @param scope [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new + # + # # Call the search_entries method. + # result = client.search_entries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. + # p item + # end + # + def search_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::SearchEntriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_entries.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_entries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :search_entries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :search_entries, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CatalogService API. + # + # This class represents the configuration for CatalogService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_entry_type to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::CatalogService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_entry_type.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_entry_type.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CatalogService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry_type + ## + # RPC-specific configuration for `update_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry_type + ## + # RPC-specific configuration for `delete_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry_type + ## + # RPC-specific configuration for `list_entry_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entry_types + ## + # RPC-specific configuration for `get_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry_type + ## + # RPC-specific configuration for `create_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :create_aspect_type + ## + # RPC-specific configuration for `update_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :update_aspect_type + ## + # RPC-specific configuration for `delete_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_aspect_type + ## + # RPC-specific configuration for `list_aspect_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_aspect_types + ## + # RPC-specific configuration for `get_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_aspect_type + ## + # RPC-specific configuration for `create_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry_group + ## + # RPC-specific configuration for `update_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry_group + ## + # RPC-specific configuration for `delete_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry_group + ## + # RPC-specific configuration for `list_entry_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entry_groups + ## + # RPC-specific configuration for `get_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry_group + ## + # RPC-specific configuration for `create_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry + ## + # RPC-specific configuration for `update_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry + ## + # RPC-specific configuration for `delete_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry + ## + # RPC-specific configuration for `list_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entries + ## + # RPC-specific configuration for `get_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry + ## + # RPC-specific configuration for `lookup_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_entry + ## + # RPC-specific configuration for `search_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :search_entries + + # @private + def initialize parent_rpcs = nil + create_entry_type_config = parent_rpcs.create_entry_type if parent_rpcs.respond_to? :create_entry_type + @create_entry_type = ::Gapic::Config::Method.new create_entry_type_config + update_entry_type_config = parent_rpcs.update_entry_type if parent_rpcs.respond_to? :update_entry_type + @update_entry_type = ::Gapic::Config::Method.new update_entry_type_config + delete_entry_type_config = parent_rpcs.delete_entry_type if parent_rpcs.respond_to? :delete_entry_type + @delete_entry_type = ::Gapic::Config::Method.new delete_entry_type_config + list_entry_types_config = parent_rpcs.list_entry_types if parent_rpcs.respond_to? :list_entry_types + @list_entry_types = ::Gapic::Config::Method.new list_entry_types_config + get_entry_type_config = parent_rpcs.get_entry_type if parent_rpcs.respond_to? :get_entry_type + @get_entry_type = ::Gapic::Config::Method.new get_entry_type_config + create_aspect_type_config = parent_rpcs.create_aspect_type if parent_rpcs.respond_to? :create_aspect_type + @create_aspect_type = ::Gapic::Config::Method.new create_aspect_type_config + update_aspect_type_config = parent_rpcs.update_aspect_type if parent_rpcs.respond_to? :update_aspect_type + @update_aspect_type = ::Gapic::Config::Method.new update_aspect_type_config + delete_aspect_type_config = parent_rpcs.delete_aspect_type if parent_rpcs.respond_to? :delete_aspect_type + @delete_aspect_type = ::Gapic::Config::Method.new delete_aspect_type_config + list_aspect_types_config = parent_rpcs.list_aspect_types if parent_rpcs.respond_to? :list_aspect_types + @list_aspect_types = ::Gapic::Config::Method.new list_aspect_types_config + get_aspect_type_config = parent_rpcs.get_aspect_type if parent_rpcs.respond_to? :get_aspect_type + @get_aspect_type = ::Gapic::Config::Method.new get_aspect_type_config + create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group + @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config + update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group + @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config + delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group + @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config + list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups + @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config + get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group + @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config + create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry + @create_entry = ::Gapic::Config::Method.new create_entry_config + update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry + @update_entry = ::Gapic::Config::Method.new update_entry_config + delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry + @delete_entry = ::Gapic::Config::Method.new delete_entry_config + list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries + @list_entries = ::Gapic::Config::Method.new list_entries_config + get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry + @get_entry = ::Gapic::Config::Method.new get_entry_config + lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry + @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config + search_entries_config = parent_rpcs.search_entries if parent_rpcs.respond_to? :search_entries + @search_entries = ::Gapic::Config::Method.new search_entries_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb new file mode 100644 index 000000000000..1b328b2e7752 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + # Credentials for the CatalogService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb new file mode 100644 index 000000000000..87e2bfd1d4a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb @@ -0,0 +1,801 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CatalogService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CatalogService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb new file mode 100644 index 000000000000..465f22f78019 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + # Path helper methods for the CatalogService API. + module Paths + ## + # Create a fully-qualified AspectType resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/aspectTypes/{aspect_type}` + # + # @param project [String] + # @param location [String] + # @param aspect_type [String] + # + # @return [::String] + def aspect_type_path project:, location:, aspect_type: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/aspectTypes/#{aspect_type}" + end + + ## + # Create a fully-qualified Entry resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}` + # + # @param project [String] + # @param location [String] + # @param entry_group [String] + # @param entry [String] + # + # @return [::String] + def entry_path project:, location:, entry_group:, entry: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "entry_group cannot contain /" if entry_group.to_s.include? "/" + + "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}/entries/#{entry}" + end + + ## + # Create a fully-qualified EntryGroup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/entryGroups/{entry_group}` + # + # @param project [String] + # @param location [String] + # @param entry_group [String] + # + # @return [::String] + def entry_group_path project:, location:, entry_group: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}" + end + + ## + # Create a fully-qualified EntryType resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/entryTypes/{entry_type}` + # + # @param project [String] + # @param location [String] + # @param entry_type [String] + # + # @return [::String] + def entry_type_path project:, location:, entry_type: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/entryTypes/#{entry_type}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb new file mode 100644 index 000000000000..364eb0c5e5a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/catalog_service/credentials" +require "google/cloud/dataplex/v1/catalog_service/paths" +require "google/cloud/dataplex/v1/catalog_service/rest/operations" +require "google/cloud/dataplex/v1/catalog_service/rest/client" + +module Google + module Cloud + module Dataplex + module 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. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/catalog_service/rest" + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + module CatalogService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/catalog_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb new file mode 100644 index 000000000000..398eb9db3daa --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb @@ -0,0 +1,2622 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/catalog_pb" +require "google/cloud/dataplex/v1/catalog_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + module Rest + ## + # REST client for the CatalogService service. + # + # 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. + # + class Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :catalog_service_stub + + ## + # Configure the CatalogService Client class. + # + # See {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CatalogService clients + # ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_entry_type.timeout = 60.0 + + default_config.rpcs.update_entry_type.timeout = 60.0 + + default_config.rpcs.delete_entry_type.timeout = 60.0 + + default_config.rpcs.list_entry_types.timeout = 60.0 + default_config.rpcs.list_entry_types.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry_type.timeout = 60.0 + default_config.rpcs.get_entry_type.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_aspect_type.timeout = 60.0 + + default_config.rpcs.update_aspect_type.timeout = 60.0 + + default_config.rpcs.delete_aspect_type.timeout = 60.0 + + default_config.rpcs.list_aspect_types.timeout = 60.0 + default_config.rpcs.list_aspect_types.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_aspect_type.timeout = 60.0 + default_config.rpcs.get_aspect_type.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_entry_group.timeout = 60.0 + + default_config.rpcs.update_entry_group.timeout = 60.0 + + default_config.rpcs.delete_entry_group.timeout = 60.0 + + default_config.rpcs.list_entry_groups.timeout = 60.0 + default_config.rpcs.list_entry_groups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry_group.timeout = 60.0 + default_config.rpcs.get_entry_group.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_entry.timeout = 60.0 + + default_config.rpcs.update_entry.timeout = 60.0 + default_config.rpcs.update_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.delete_entry.timeout = 60.0 + + default_config.rpcs.list_entries.timeout = 20.0 + default_config.rpcs.list_entries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry.timeout = 20.0 + default_config.rpcs.get_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.lookup_entry.timeout = 20.0 + default_config.rpcs.lookup_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.search_entries.timeout = 60.0 + default_config.rpcs.search_entries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CatalogService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @catalog_service_stub.universe_domain + end + + ## + # Create a new CatalogService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CatalogService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @catalog_service_stub = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @catalog_service_stub.endpoint + config.universe_domain = @catalog_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @catalog_service_stub.endpoint + config.universe_domain = @catalog_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::CatalogService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Creates an EntryType + # + # @overload create_entry_type(request, options = nil) + # Pass arguments to `create_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_entry_type(parent: nil, entry_type_id: nil, entry_type: nil, validate_only: nil) + # Pass arguments to `create_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the EntryType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a GCP region. + # @param entry_type_id [::String] + # Required. EntryType identifier. + # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] + # Required. EntryType Resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new + # + # # Call the create_entry_type method. + # result = client.create_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_entry_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_entry_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a EntryType resource. + # + # @overload update_entry_type(request, options = nil) + # Pass arguments to `update_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_entry_type(entry_type: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] + # Required. EntryType Resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new + # + # # Call the update_entry_type method. + # result = client.update_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_entry_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.update_entry_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a EntryType resource. + # + # @overload delete_entry_type(request, options = nil) + # Pass arguments to `delete_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_entry_type(name: nil, etag: nil) + # Pass arguments to `delete_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryTypeRequest method returns an ABORTED error response + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new + # + # # Call the delete_entry_type method. + # result = client.delete_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_entry_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.delete_entry_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists EntryType resources in a project and location. + # + # @overload list_entry_types(request, options = nil) + # Pass arguments to `list_entry_types` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntryTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_entry_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_entry_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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 order_by [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new + # + # # Call the list_entry_types method. + # result = client.list_entry_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. + # p item + # end + # + def list_entry_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_entry_types.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_entry_types.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_entry_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.list_entry_types request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a EntryType resource. + # + # @overload get_entry_type(request, options = nil) + # Pass arguments to `get_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_entry_type(name: nil) + # Pass arguments to `get_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new + # + # # Call the get_entry_type method. + # result = client.get_entry_type request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. + # p result + # + def get_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_entry_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.get_entry_type request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an AspectType + # + # @overload create_aspect_type(request, options = nil) + # Pass arguments to `create_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_aspect_type(parent: nil, aspect_type_id: nil, aspect_type: nil, validate_only: nil) + # Pass arguments to `create_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the AspectType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a GCP region. + # @param aspect_type_id [::String] + # Required. AspectType identifier. + # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] + # Required. AspectType Resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new + # + # # Call the create_aspect_type method. + # result = client.create_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_aspect_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_aspect_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a AspectType resource. + # + # @overload update_aspect_type(request, options = nil) + # Pass arguments to `update_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_aspect_type(aspect_type: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] + # Required. AspectType Resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new + # + # # Call the update_aspect_type method. + # result = client.update_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_aspect_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.update_aspect_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a AspectType resource. + # + # @overload delete_aspect_type(request, options = nil) + # Pass arguments to `delete_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_aspect_type(name: nil, etag: nil) + # Pass arguments to `delete_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteAspectTypeRequest method returns an ABORTED error response + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new + # + # # Call the delete_aspect_type method. + # result = client.delete_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_aspect_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.delete_aspect_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists AspectType resources in a project and location. + # + # @overload list_aspect_types(request, options = nil) + # Pass arguments to `list_aspect_types` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAspectTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_aspect_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_aspect_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # 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. + # @param page_token [::String] + # 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. + # @param filter [::String] + # 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 order_by [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new + # + # # Call the list_aspect_types method. + # result = client.list_aspect_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. + # p item + # end + # + def list_aspect_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_aspect_types.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_aspect_types.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_aspect_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.list_aspect_types request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a AspectType resource. + # + # @overload get_aspect_type(request, options = nil) + # Pass arguments to `get_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_aspect_type(name: nil) + # Pass arguments to `get_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::AspectType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new + # + # # Call the get_aspect_type method. + # result = client.get_aspect_type request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. + # p result + # + def get_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_aspect_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.get_aspect_type request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an EntryGroup + # + # @overload create_entry_group(request, options = nil) + # Pass arguments to `create_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil, validate_only: nil) + # Pass arguments to `create_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 entry_group_id [::String] + # Required. EntryGroup identifier. + # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] + # Required. EntryGroup Resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new + # + # # Call the create_entry_group method. + # result = client.create_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_entry_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_entry_group request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a EntryGroup resource. + # + # @overload update_entry_group(request, options = nil) + # Pass arguments to `update_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_entry_group(entry_group: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] + # Required. EntryGroup Resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new + # + # # Call the update_entry_group method. + # result = client.update_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_entry_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.update_entry_group request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a EntryGroup resource. + # + # @overload delete_entry_group(request, options = nil) + # Pass arguments to `delete_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_entry_group(name: nil, etag: nil) + # Pass arguments to `delete_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryGroupRequest method returns an ABORTED error response + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new + # + # # Call the delete_entry_group method. + # result = client.delete_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_entry_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.delete_entry_group request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists EntryGroup resources in a project and location. + # + # @overload list_entry_groups(request, options = nil) + # Pass arguments to `list_entry_groups` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_entry_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_entry_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # 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. + # @param page_token [::String] + # 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. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new + # + # # Call the list_entry_groups method. + # result = client.list_entry_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. + # p item + # end + # + def list_entry_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_entry_groups.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_entry_groups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_entry_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.list_entry_groups request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a EntryGroup resource. + # + # @overload get_entry_group(request, options = nil) + # Pass arguments to `get_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_entry_group(name: nil) + # Pass arguments to `get_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new + # + # # Call the get_entry_group method. + # result = client.get_entry_group request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. + # p result + # + def get_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_entry_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.get_entry_group request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an Entry. + # + # @overload create_entry(request, options = nil) + # Pass arguments to `create_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_entry(parent: nil, entry_id: nil, entry: nil) + # Pass arguments to `create_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @param entry_id [::String] + # 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 + # `//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 + # Cloud. + # + # The maximum size of the field is 4000 characters. + # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] + # Required. Entry resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new + # + # # Call the create_entry method. + # result = client.create_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def create_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_entry request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an Entry. + # + # @overload update_entry(request, options = nil) + # Pass arguments to `update_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_entry(entry: nil, update_mask: nil, allow_missing: nil, delete_missing_aspects: nil, aspect_keys: nil) + # Pass arguments to `update_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] + # Required. Entry resource. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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. + # @param allow_missing [::Boolean] + # Optional. If set to true and the entry does not exist, it will be created. + # @param delete_missing_aspects [::Boolean] + # 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. + # @param aspect_keys [::Array<::String>] + # 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 + # `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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new + # + # # Call the update_entry method. + # result = client.update_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def update_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.update_entry request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an Entry. + # + # @overload delete_entry(request, options = nil) + # Pass arguments to `delete_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_entry(name: nil) + # Pass arguments to `delete_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new + # + # # Call the delete_entry method. + # result = client.delete_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def delete_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.delete_entry request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists entries within an entry group. + # + # @overload list_entries(request, options = nil) + # Pass arguments to `list_entries` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_entries(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_entries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @param page_size [::Integer] + # @param page_token [::String] + # Optional. The pagination token returned by a previous request. + # @param filter [::String] + # 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" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new + # + # # Call the list_entries method. + # result = client.list_entries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. + # p item + # end + # + def list_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_entries.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_entries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.list_entries request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_entries, "entries", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a single entry. + # + # @overload get_entry(request, options = nil) + # Pass arguments to `get_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_entry(name: nil, view: nil, aspect_types: nil, paths: nil) + # Pass arguments to `get_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @param view [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View for controlling which parts of an entry are to be returned. + # @param aspect_types [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # Only works if the CUSTOM view is selected. + # @param paths [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. Only works if the CUSTOM view is selected. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryRequest.new + # + # # Call the get_entry method. + # result = client.get_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def get_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.get_entry request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Looks up a single entry. + # + # @overload lookup_entry(request, options = nil) + # Pass arguments to `lookup_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::LookupEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload lookup_entry(name: nil, view: nil, aspect_types: nil, paths: nil, entry: nil) + # Pass arguments to `lookup_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/{location}`. + # @param view [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View for controlling which parts of an entry are to be returned. + # @param aspect_types [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # Only works if the CUSTOM view is selected. + # @param paths [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. Only works if the CUSTOM view is selected. + # @param entry [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new + # + # # Call the lookup_entry method. + # result = client.lookup_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def lookup_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.lookup_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.lookup_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lookup_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.lookup_entry request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Searches for entries matching given query and scope. + # + # @overload search_entries(request, options = nil) + # Pass arguments to `search_entries` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::SearchEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil) + # Pass arguments to `search_entries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/{location}`. + # @param query [::String] + # Required. The query against which entries in scope should be matched. + # @param page_size [::Integer] + # Optional. Pagination. + # @param page_token [::String] + # @param order_by [::String] + # Optional. Ordering of the results. Supported options to be added later. + # @param scope [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new + # + # # Call the search_entries method. + # result = client.search_entries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. + # p item + # end + # + def search_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::SearchEntriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.search_entries.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.search_entries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.search_entries request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CatalogService REST API. + # + # This class represents the configuration for CatalogService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_entry_type to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_entry_type.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_entry_type.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the CatalogService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry_type + ## + # RPC-specific configuration for `update_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry_type + ## + # RPC-specific configuration for `delete_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry_type + ## + # RPC-specific configuration for `list_entry_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entry_types + ## + # RPC-specific configuration for `get_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry_type + ## + # RPC-specific configuration for `create_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :create_aspect_type + ## + # RPC-specific configuration for `update_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :update_aspect_type + ## + # RPC-specific configuration for `delete_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_aspect_type + ## + # RPC-specific configuration for `list_aspect_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_aspect_types + ## + # RPC-specific configuration for `get_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_aspect_type + ## + # RPC-specific configuration for `create_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry_group + ## + # RPC-specific configuration for `update_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry_group + ## + # RPC-specific configuration for `delete_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry_group + ## + # RPC-specific configuration for `list_entry_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entry_groups + ## + # RPC-specific configuration for `get_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry_group + ## + # RPC-specific configuration for `create_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry + ## + # RPC-specific configuration for `update_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry + ## + # RPC-specific configuration for `delete_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry + ## + # RPC-specific configuration for `list_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entries + ## + # RPC-specific configuration for `get_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry + ## + # RPC-specific configuration for `lookup_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_entry + ## + # RPC-specific configuration for `search_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :search_entries + + # @private + def initialize parent_rpcs = nil + create_entry_type_config = parent_rpcs.create_entry_type if parent_rpcs.respond_to? :create_entry_type + @create_entry_type = ::Gapic::Config::Method.new create_entry_type_config + update_entry_type_config = parent_rpcs.update_entry_type if parent_rpcs.respond_to? :update_entry_type + @update_entry_type = ::Gapic::Config::Method.new update_entry_type_config + delete_entry_type_config = parent_rpcs.delete_entry_type if parent_rpcs.respond_to? :delete_entry_type + @delete_entry_type = ::Gapic::Config::Method.new delete_entry_type_config + list_entry_types_config = parent_rpcs.list_entry_types if parent_rpcs.respond_to? :list_entry_types + @list_entry_types = ::Gapic::Config::Method.new list_entry_types_config + get_entry_type_config = parent_rpcs.get_entry_type if parent_rpcs.respond_to? :get_entry_type + @get_entry_type = ::Gapic::Config::Method.new get_entry_type_config + create_aspect_type_config = parent_rpcs.create_aspect_type if parent_rpcs.respond_to? :create_aspect_type + @create_aspect_type = ::Gapic::Config::Method.new create_aspect_type_config + update_aspect_type_config = parent_rpcs.update_aspect_type if parent_rpcs.respond_to? :update_aspect_type + @update_aspect_type = ::Gapic::Config::Method.new update_aspect_type_config + delete_aspect_type_config = parent_rpcs.delete_aspect_type if parent_rpcs.respond_to? :delete_aspect_type + @delete_aspect_type = ::Gapic::Config::Method.new delete_aspect_type_config + list_aspect_types_config = parent_rpcs.list_aspect_types if parent_rpcs.respond_to? :list_aspect_types + @list_aspect_types = ::Gapic::Config::Method.new list_aspect_types_config + get_aspect_type_config = parent_rpcs.get_aspect_type if parent_rpcs.respond_to? :get_aspect_type + @get_aspect_type = ::Gapic::Config::Method.new get_aspect_type_config + create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group + @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config + update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group + @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config + delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group + @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config + list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups + @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config + get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group + @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config + create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry + @create_entry = ::Gapic::Config::Method.new create_entry_config + update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry + @update_entry = ::Gapic::Config::Method.new update_entry_config + delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry + @delete_entry = ::Gapic::Config::Method.new delete_entry_config + list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries + @list_entries = ::Gapic::Config::Method.new list_entries_config + get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry + @get_entry = ::Gapic::Config::Method.new get_entry_config + lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry + @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config + search_entries_config = parent_rpcs.search_entries if parent_rpcs.respond_to? :search_entries + @search_entries = ::Gapic::Config::Method.new search_entries_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb new file mode 100644 index 000000000000..989b9b05ba02 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb @@ -0,0 +1,895 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CatalogService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CatalogService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb new file mode 100644 index 000000000000..260110930560 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb @@ -0,0 +1,1375 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/catalog_pb" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + module Rest + ## + # REST service stub for the CatalogService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the create_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_entry_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_entry_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_entry_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_entry_types REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] + # A result object deserialized from the server's reply + def list_entry_types request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_entry_types_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # A result object deserialized from the server's reply + def get_entry_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::EntryType.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_aspect_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_aspect_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_aspect_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_aspect_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_aspect_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_aspect_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_aspect_types REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] + # A result object deserialized from the server's reply + def list_aspect_types request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_aspect_types_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::AspectType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # A result object deserialized from the server's reply + def get_aspect_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_aspect_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::AspectType.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_entry_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_entry_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_entry_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_entry_groups REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] + # A result object deserialized from the server's reply + def list_entry_groups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_entry_groups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # A result object deserialized from the server's reply + def get_entry_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::EntryGroup.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def create_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def update_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def delete_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_entries REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntriesResponse] + # A result object deserialized from the server's reply + def list_entries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_entries_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def get_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the lookup_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::LookupEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def lookup_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lookup_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the search_entries REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::SearchEntriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] + # A result object deserialized from the server's reply + def search_entries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_entries_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the create_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_entry_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/entryTypes", + body: "entry_type", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_entry_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{entry_type.name}", + body: "entry_type", + matches: [ + ["entry_type.name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_entry_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_entry_types REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_entry_types_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/entryTypes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_entry_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_aspect_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/aspectTypes", + body: "aspect_type", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_aspect_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{aspect_type.name}", + body: "aspect_type", + matches: [ + ["aspect_type.name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_aspect_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_aspect_types REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_aspect_types_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/aspectTypes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_aspect_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_entry_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/entryGroups", + body: "entry_group", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_entry_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{entry_group.name}", + body: "entry_group", + matches: [ + ["entry_group.name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_entry_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_entry_groups REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_entry_groups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/entryGroups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_entry_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/entries", + body: "entry", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{entry.name}", + body: "entry", + matches: [ + ["entry.name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_entries REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_entries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/entries", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the lookup_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::LookupEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_lookup_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:lookupEntry", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_entries REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::SearchEntriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_entries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:searchEntries", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb new file mode 100644 index 000000000000..9a6d7d621caf --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb @@ -0,0 +1,91 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/catalog.proto for package 'Google.Cloud.Dataplex.V1' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# + +require 'grpc' +require 'google/cloud/dataplex/v1/catalog_pb' + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + # 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. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.CatalogService' + + # Creates an EntryType + rpc :CreateEntryType, ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Google::Longrunning::Operation + # Updates a EntryType resource. + rpc :UpdateEntryType, ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Google::Longrunning::Operation + # Deletes a EntryType resource. + rpc :DeleteEntryType, ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Google::Longrunning::Operation + # Lists EntryType resources in a project and location. + rpc :ListEntryTypes, ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse + # Retrieves a EntryType resource. + rpc :GetEntryType, ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Google::Cloud::Dataplex::V1::EntryType + # Creates an AspectType + rpc :CreateAspectType, ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Google::Longrunning::Operation + # Updates a AspectType resource. + rpc :UpdateAspectType, ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Google::Longrunning::Operation + # Deletes a AspectType resource. + rpc :DeleteAspectType, ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Google::Longrunning::Operation + # Lists AspectType resources in a project and location. + rpc :ListAspectTypes, ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse + # Retrieves a AspectType resource. + rpc :GetAspectType, ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Google::Cloud::Dataplex::V1::AspectType + # Creates an EntryGroup + rpc :CreateEntryGroup, ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Google::Longrunning::Operation + # Updates a EntryGroup resource. + rpc :UpdateEntryGroup, ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Google::Longrunning::Operation + # Deletes a EntryGroup resource. + rpc :DeleteEntryGroup, ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Google::Longrunning::Operation + # Lists EntryGroup resources in a project and location. + rpc :ListEntryGroups, ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse + # Retrieves a EntryGroup resource. + rpc :GetEntryGroup, ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Google::Cloud::Dataplex::V1::EntryGroup + # Creates an Entry. + rpc :CreateEntry, ::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Google::Cloud::Dataplex::V1::Entry + # Updates an Entry. + rpc :UpdateEntry, ::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Google::Cloud::Dataplex::V1::Entry + # Deletes an Entry. + rpc :DeleteEntry, ::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Google::Cloud::Dataplex::V1::Entry + # Lists entries within an entry group. + rpc :ListEntries, ::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Google::Cloud::Dataplex::V1::ListEntriesResponse + # Gets a single entry. + rpc :GetEntry, ::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Google::Cloud::Dataplex::V1::Entry + # Looks up a single entry. + rpc :LookupEntry, ::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Google::Cloud::Dataplex::V1::Entry + # Searches for entries matching given query and scope. + rpc :SearchEntries, ::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Google::Cloud::Dataplex::V1::SearchEntriesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb new file mode 100644 index 000000000000..972edf974184 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/content.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/analyze_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n&google/cloud/dataplex/v1/content.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/analyze.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa1\x01\n\x14\x43reateContentRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x37\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.google.cloud.dataplex.v1.ContentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xa1\x01\n\x14UpdateContentRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x37\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.google.cloud.dataplex.v1.ContentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"M\n\x14\x44\x65leteContentRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Content\"\x90\x01\n\x12ListContentRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"b\n\x13ListContentResponse\x12\x32\n\x07\x63ontent\x18\x01 \x03(\x0b\x32!.google.cloud.dataplex.v1.Content\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd8\x01\n\x11GetContentRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Content\x12J\n\x04view\x18\x02 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.GetContentRequest.ContentViewB\x03\xe0\x41\x01\"@\n\x0b\x43ontentView\x12\x1c\n\x18\x43ONTENT_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x32\xad\x10\n\x0e\x43ontentService\x12\x80\x02\n\rCreateContent\x12..google.cloud.dataplex.v1.CreateContentRequest\x1a!.google.cloud.dataplex.v1.Content\"\x9b\x01\xda\x41\x0eparent,content\x82\xd3\xe4\x93\x02\x83\x01\"8/v1/{parent=projects/*/locations/*/lakes/*}/contentitems:\x07\x63ontentZ>\"3/v1/{parent=projects/*/locations/*/lakes/*}/content:\x07\x63ontent\x12\x97\x02\n\rUpdateContent\x12..google.cloud.dataplex.v1.UpdateContentRequest\x1a!.google.cloud.dataplex.v1.Content\"\xb2\x01\xda\x41\x13\x63ontent,update_mask\x82\xd3\xe4\x93\x02\x95\x01\x32\x41/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}:\x07\x63ontentZG2 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a content. Only supports full resource update. + # + # @overload update_content(request, options = nil) + # Pass arguments to `update_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_content(update_mask: nil, content: nil, validate_only: nil) + # Pass arguments to `update_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new + # + # # Call the update_content method. + # result = client.update_content request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Content. + # p result + # + def update_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.content&.name + header_params["content.name"] = request.content.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_content.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.call_rpc :update_content, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a content. + # + # @overload delete_content(request, options = nil) + # Pass arguments to `delete_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_content(name: nil) + # Pass arguments to `delete_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the content: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new + # + # # Call the delete_content method. + # result = client.delete_content request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_content.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.call_rpc :delete_content, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a content resource. + # + # @overload get_content(request, options = nil) + # Pass arguments to `get_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_content(name: nil, view: nil) + # Pass arguments to `get_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the content: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + # @param view [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView] + # Optional. Specify content view to make a partial request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetContentRequest.new + # + # # Call the get_content method. + # result = client.get_content request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Content. + # p result + # + def get_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_content.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.call_rpc :get_content, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List content. + # + # @overload list_content(request, options = nil) + # Pass arguments to `list_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_content(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListContentRequest.new + # + # # Call the list_content method. + # result = client.list_content request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Content. + # p item + # end + # + def list_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_content.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.call_rpc :list_content, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @content_service_stub, :list_content, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ContentService API. + # + # This class represents the configuration for ContentService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_content to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::ContentService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_content.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_content.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ContentService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_content` + # @return [::Gapic::Config::Method] + # + attr_reader :create_content + ## + # RPC-specific configuration for `update_content` + # @return [::Gapic::Config::Method] + # + attr_reader :update_content + ## + # RPC-specific configuration for `delete_content` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_content + ## + # RPC-specific configuration for `get_content` + # @return [::Gapic::Config::Method] + # + attr_reader :get_content + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `list_content` + # @return [::Gapic::Config::Method] + # + attr_reader :list_content + + # @private + def initialize parent_rpcs = nil + create_content_config = parent_rpcs.create_content if parent_rpcs.respond_to? :create_content + @create_content = ::Gapic::Config::Method.new create_content_config + update_content_config = parent_rpcs.update_content if parent_rpcs.respond_to? :update_content + @update_content = ::Gapic::Config::Method.new update_content_config + delete_content_config = parent_rpcs.delete_content if parent_rpcs.respond_to? :delete_content + @delete_content = ::Gapic::Config::Method.new delete_content_config + get_content_config = parent_rpcs.get_content if parent_rpcs.respond_to? :get_content + @get_content = ::Gapic::Config::Method.new get_content_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + list_content_config = parent_rpcs.list_content if parent_rpcs.respond_to? :list_content + @list_content = ::Gapic::Config::Method.new list_content_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb new file mode 100644 index 000000000000..19e1ffcd0c88 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module ContentService + # Credentials for the ContentService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb new file mode 100644 index 000000000000..57ef53d237e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + module ContentService + # Path helper methods for the ContentService API. + module Paths + ## + # Create a fully-qualified Content resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/content/{content}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param content [String] + # + # @return [::String] + def content_path project:, location:, lake:, content: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/content/#{content}" + end + + ## + # Create a fully-qualified Lake resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # + # @return [::String] + def lake_path project:, location:, lake: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb new file mode 100644 index 000000000000..42bc1424d9a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/content_service/credentials" +require "google/cloud/dataplex/v1/content_service/paths" +require "google/cloud/dataplex/v1/content_service/rest/client" + +module Google + module Cloud + module Dataplex + module V1 + ## + # ContentService manages Notebook and SQL Scripts for Dataplex. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/content_service/rest" + # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + module ContentService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/content_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb new file mode 100644 index 000000000000..d02359ca50f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb @@ -0,0 +1,1131 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/content_pb" +require "google/cloud/dataplex/v1/content_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module ContentService + module Rest + ## + # REST client for the ContentService service. + # + # ContentService manages Notebook and SQL Scripts for Dataplex. + # + class Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :content_service_stub + + ## + # Configure the ContentService Client class. + # + # See {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ContentService clients + # ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_content.timeout = 60.0 + + default_config.rpcs.update_content.timeout = 60.0 + + default_config.rpcs.delete_content.timeout = 60.0 + + default_config.rpcs.get_content.timeout = 60.0 + default_config.rpcs.get_content.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_iam_policy.timeout = 60.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.set_iam_policy.timeout = 60.0 + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_content.timeout = 60.0 + default_config.rpcs.list_content.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ContentService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @content_service_stub.universe_domain + end + + ## + # Create a new ContentService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ContentService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @content_service_stub = ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @content_service_stub.endpoint + config.universe_domain = @content_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @content_service_stub.endpoint + config.universe_domain = @content_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Create a content. + # + # @overload create_content(request, options = nil) + # Pass arguments to `create_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_content(parent: nil, content: nil, validate_only: nil) + # Pass arguments to `create_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} + # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] + # Required. Content resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateContentRequest.new + # + # # Call the create_content method. + # result = client.create_content request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Content. + # p result + # + def create_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_content.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.create_content request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a content. Only supports full resource update. + # + # @overload update_content(request, options = nil) + # Pass arguments to `update_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_content(update_mask: nil, content: nil, validate_only: nil) + # Pass arguments to `update_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new + # + # # Call the update_content method. + # result = client.update_content request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Content. + # p result + # + def update_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_content.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.update_content request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a content. + # + # @overload delete_content(request, options = nil) + # Pass arguments to `delete_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_content(name: nil) + # Pass arguments to `delete_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the content: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new + # + # # Call the delete_content method. + # result = client.delete_content request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_content.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.delete_content request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a content resource. + # + # @overload get_content(request, options = nil) + # Pass arguments to `get_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_content(name: nil, view: nil) + # Pass arguments to `get_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the content: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + # @param view [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView] + # Optional. Specify content view to make a partial request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetContentRequest.new + # + # # Call the get_content method. + # result = client.get_content request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Content. + # p result + # + def get_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_content.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.get_content request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List content. + # + # @overload list_content(request, options = nil) + # Pass arguments to `list_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_content(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListContentRequest.new + # + # # Call the list_content method. + # result = client.list_content request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Content. + # p item + # end + # + def list_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_content.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.list_content request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @content_service_stub, :list_content, "content", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ContentService REST API. + # + # This class represents the configuration for ContentService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_content to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_content.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_content.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ContentService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_content` + # @return [::Gapic::Config::Method] + # + attr_reader :create_content + ## + # RPC-specific configuration for `update_content` + # @return [::Gapic::Config::Method] + # + attr_reader :update_content + ## + # RPC-specific configuration for `delete_content` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_content + ## + # RPC-specific configuration for `get_content` + # @return [::Gapic::Config::Method] + # + attr_reader :get_content + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `list_content` + # @return [::Gapic::Config::Method] + # + attr_reader :list_content + + # @private + def initialize parent_rpcs = nil + create_content_config = parent_rpcs.create_content if parent_rpcs.respond_to? :create_content + @create_content = ::Gapic::Config::Method.new create_content_config + update_content_config = parent_rpcs.update_content if parent_rpcs.respond_to? :update_content + @update_content = ::Gapic::Config::Method.new update_content_config + delete_content_config = parent_rpcs.delete_content if parent_rpcs.respond_to? :delete_content + @delete_content = ::Gapic::Config::Method.new delete_content_config + get_content_config = parent_rpcs.get_content if parent_rpcs.respond_to? :get_content + @get_content = ::Gapic::Config::Method.new get_content_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + list_content_config = parent_rpcs.list_content if parent_rpcs.respond_to? :list_content + @list_content = ::Gapic::Config::Method.new list_content_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb new file mode 100644 index 000000000000..4ea2e6fdf50e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb @@ -0,0 +1,605 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/content_pb" + +module Google + module Cloud + module Dataplex + module V1 + module ContentService + module Rest + ## + # REST service stub for the ContentService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the create_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateContentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # A result object deserialized from the server's reply + def create_content request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_content_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateContentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # A result object deserialized from the server's reply + def update_content request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_content_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteContentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_content request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_content_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetContentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # A result object deserialized from the server's reply + def get_content request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_content_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListContentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListContentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListContentResponse] + # A result object deserialized from the server's reply + def list_content request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_content_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListContentResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the create_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateContentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_content_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/contentitems", + body: "content", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/content", + body: "content", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateContentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_content_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{content.name}", + body: "content", + matches: [ + ["content.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{content.name}", + body: "content", + matches: [ + ["content.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteContentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_content_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetContentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_content_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListContentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_content_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/contentitems", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/content", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb new file mode 100644 index 000000000000..e2f3c9f33182 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb @@ -0,0 +1,77 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/content.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# + +require 'grpc' +require 'google/cloud/dataplex/v1/content_pb' + +module Google + module Cloud + module Dataplex + module V1 + module ContentService + # ContentService manages Notebook and SQL Scripts for Dataplex. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.ContentService' + + # Create a content. + rpc :CreateContent, ::Google::Cloud::Dataplex::V1::CreateContentRequest, ::Google::Cloud::Dataplex::V1::Content + # Update a content. Only supports full resource update. + rpc :UpdateContent, ::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Google::Cloud::Dataplex::V1::Content + # Delete a content. + rpc :DeleteContent, ::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Google::Protobuf::Empty + # Get a content resource. + rpc :GetContent, ::Google::Cloud::Dataplex::V1::GetContentRequest, ::Google::Cloud::Dataplex::V1::Content + # 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, ::Google::Iam::V1::Policy + # 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, ::Google::Iam::V1::Policy + # 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, ::Google::Iam::V1::TestIamPermissionsResponse + # List content. + rpc :ListContent, ::Google::Cloud::Dataplex::V1::ListContentRequest, ::Google::Cloud::Dataplex::V1::ListContentResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb new file mode 100644 index 000000000000..81faee451353 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/data_profile.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/dataplex/v1/processing_pb' + + +descriptor_data = "\n+google/cloud/dataplex/v1/data_profile.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a)google/cloud/dataplex/v1/processing.proto\"\xa8\x04\n\x0f\x44\x61taProfileSpec\x12\x1d\n\x10sampling_percent\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x12\x17\n\nrow_filter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12Y\n\x11post_scan_actions\x18\x04 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataProfileSpec.PostScanActionsB\x03\xe0\x41\x01\x12U\n\x0einclude_fields\x18\x05 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsB\x03\xe0\x41\x01\x12U\n\x0e\x65xclude_fields\x18\x06 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsB\x03\xe0\x41\x01\x1a\xa7\x01\n\x0fPostScanActions\x12\x66\n\x0f\x62igquery_export\x18\x01 \x01(\x0b\x32H.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExportB\x03\xe0\x41\x01\x1a,\n\x0e\x42igQueryExport\x12\x1a\n\rresults_table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a*\n\x0eSelectedFields\x12\x18\n\x0b\x66ield_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\xe4\r\n\x11\x44\x61taProfileResult\x12\x11\n\trow_count\x18\x03 \x01(\x03\x12\x44\n\x07profile\x18\x04 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.DataProfileResult.Profile\x12;\n\x0cscanned_data\x18\x05 \x01(\x0b\x32%.google.cloud.dataplex.v1.ScannedData\x12h\n\x18post_scan_actions_result\x18\x06 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResultB\x03\xe0\x41\x03\x1a\xce\x08\n\x07Profile\x12I\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x39.google.cloud.dataplex.v1.DataProfileResult.Profile.Field\x1a\xf7\x07\n\x05\x46ield\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0c\n\x04mode\x18\x03 \x01(\t\x12V\n\x07profile\x18\x04 \x01(\x0b\x32\x45.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo\x1a\xeb\x06\n\x0bProfileInfo\x12\x12\n\nnull_ratio\x18\x02 \x01(\x01\x12\x16\n\x0e\x64istinct_ratio\x18\x03 \x01(\x01\x12\x65\n\x0ctop_n_values\x18\x04 \x03(\x0b\x32O.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue\x12o\n\x0estring_profile\x18\x65 \x01(\x0b\x32U.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfoH\x00\x12q\n\x0finteger_profile\x18\x66 \x01(\x0b\x32V.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfoH\x00\x12o\n\x0e\x64ouble_profile\x18g \x01(\x0b\x32U.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfoH\x00\x1aQ\n\x0fStringFieldInfo\x12\x12\n\nmin_length\x18\x01 \x01(\x03\x12\x12\n\nmax_length\x18\x02 \x01(\x03\x12\x16\n\x0e\x61verage_length\x18\x03 \x01(\x01\x1al\n\x10IntegerFieldInfo\x12\x0f\n\x07\x61verage\x18\x01 \x01(\x01\x12\x1a\n\x12standard_deviation\x18\x03 \x01(\x01\x12\x0b\n\x03min\x18\x04 \x01(\x03\x12\x11\n\tquartiles\x18\x06 \x03(\x03\x12\x0b\n\x03max\x18\x05 \x01(\x03\x1ak\n\x0f\x44oubleFieldInfo\x12\x0f\n\x07\x61verage\x18\x01 \x01(\x01\x12\x1a\n\x12standard_deviation\x18\x03 \x01(\x01\x12\x0b\n\x03min\x18\x04 \x01(\x01\x12\x11\n\tquartiles\x18\x06 \x03(\x01\x12\x0b\n\x03max\x18\x05 \x01(\x01\x1a\x38\n\tTopNValue\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x12\r\n\x05ratio\x18\x03 \x01(\x01\x42\x0c\n\nfield_info\x1a\xfd\x02\n\x15PostScanActionsResult\x12{\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32V.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResultB\x03\xe0\x41\x03\x1a\xe6\x01\n\x14\x42igQueryExportResult\x12p\n\x05state\x18\x01 \x01(\x0e\x32\\.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.StateB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\x42l\n\x1c\x63om.google.cloud.dataplex.v1B\x10\x44\x61taProfileProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.dataplex.v1.ScannedData", "google/cloud/dataplex/v1/processing.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + DataProfileSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec").msgclass + DataProfileSpec::PostScanActions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.PostScanActions").msgclass + DataProfileSpec::PostScanActions::BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport").msgclass + DataProfileSpec::SelectedFields = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.SelectedFields").msgclass + DataProfileResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult").msgclass + DataProfileResult::Profile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile").msgclass + DataProfileResult::Profile::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field").msgclass + DataProfileResult::Profile::Field::ProfileInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo").msgclass + DataProfileResult::Profile::Field::ProfileInfo::StringFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo").msgclass + DataProfileResult::Profile::Field::ProfileInfo::IntegerFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo").msgclass + DataProfileResult::Profile::Field::ProfileInfo::DoubleFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo").msgclass + DataProfileResult::Profile::Field::ProfileInfo::TopNValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue").msgclass + DataProfileResult::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult").msgclass + DataProfileResult::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult").msgclass + DataProfileResult::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb new file mode 100644 index 000000000000..57d9d4786491 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/data_quality.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/processing_pb' + + +descriptor_data = "\n+google/cloud/dataplex/v1/data_quality.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/dataplex/v1/processing.proto\"\xc0\x08\n\x0f\x44\x61taQualitySpec\x12=\n\x05rules\x18\x01 \x03(\x0b\x32).google.cloud.dataplex.v1.DataQualityRuleB\x03\xe0\x41\x02\x12\x1d\n\x10sampling_percent\x18\x04 \x01(\x02\x42\x03\xe0\x41\x01\x12\x17\n\nrow_filter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12Y\n\x11post_scan_actions\x18\x06 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataQualitySpec.PostScanActionsB\x03\xe0\x41\x01\x1a\xda\x06\n\x0fPostScanActions\x12\x66\n\x0f\x62igquery_export\x18\x01 \x01(\x0b\x32H.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExportB\x03\xe0\x41\x01\x12n\n\x13notification_report\x18\x02 \x01(\x0b\x32L.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReportB\x03\xe0\x41\x01\x1a,\n\x0e\x42igQueryExport\x12\x1a\n\rresults_table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a!\n\nRecipients\x12\x13\n\x06\x65mails\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a\x35\n\x15ScoreThresholdTrigger\x12\x1c\n\x0fscore_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x1a\x13\n\x11JobFailureTrigger\x1a\x0f\n\rJobEndTrigger\x1a\xc0\x03\n\x12NotificationReport\x12]\n\nrecipients\x18\x01 \x01(\x0b\x32\x44.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.RecipientsB\x03\xe0\x41\x02\x12u\n\x17score_threshold_trigger\x18\x02 \x01(\x0b\x32O.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTriggerB\x03\xe0\x41\x01\x12m\n\x13job_failure_trigger\x18\x04 \x01(\x0b\x32K.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTriggerB\x03\xe0\x41\x01\x12\x65\n\x0fjob_end_trigger\x18\x05 \x01(\x0b\x32G.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTriggerB\x03\xe0\x41\x01\"\xd3\x06\n\x11\x44\x61taQualityResult\x12\x0e\n\x06passed\x18\x05 \x01(\x08\x12\x17\n\x05score\x18\t \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12H\n\ndimensions\x18\x02 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.DataQualityDimensionResult\x12G\n\x07\x63olumns\x18\n \x03(\x0b\x32\x31.google.cloud.dataplex.v1.DataQualityColumnResultB\x03\xe0\x41\x03\x12>\n\x05rules\x18\x03 \x03(\x0b\x32/.google.cloud.dataplex.v1.DataQualityRuleResult\x12\x11\n\trow_count\x18\x04 \x01(\x03\x12;\n\x0cscanned_data\x18\x07 \x01(\x0b\x32%.google.cloud.dataplex.v1.ScannedData\x12h\n\x18post_scan_actions_result\x18\x08 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultB\x03\xe0\x41\x03\x1a\xfd\x02\n\x15PostScanActionsResult\x12{\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32V.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResultB\x03\xe0\x41\x03\x1a\xe6\x01\n\x14\x42igQueryExportResult\x12p\n\x05state\x18\x01 \x01(\x0e\x32\\.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.StateB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\x42\x08\n\x06_score\"\xf5\x01\n\x15\x44\x61taQualityRuleResult\x12\x37\n\x04rule\x18\x01 \x01(\x0b\x32).google.cloud.dataplex.v1.DataQualityRule\x12\x0e\n\x06passed\x18\x07 \x01(\x08\x12\x17\n\x0f\x65valuated_count\x18\t \x01(\x03\x12\x14\n\x0cpassed_count\x18\x08 \x01(\x03\x12\x12\n\nnull_count\x18\x05 \x01(\x03\x12\x12\n\npass_ratio\x18\x06 \x01(\x01\x12\x1a\n\x12\x66\x61iling_rows_query\x18\n \x01(\t\x12 \n\x13\x61ssertion_row_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\"\x97\x01\n\x1a\x44\x61taQualityDimensionResult\x12\x46\n\tdimension\x18\x01 \x01(\x0b\x32..google.cloud.dataplex.v1.DataQualityDimensionB\x03\xe0\x41\x03\x12\x0e\n\x06passed\x18\x03 \x01(\x08\x12\x17\n\x05score\x18\x04 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x08\n\x06_score\"$\n\x14\x44\x61taQualityDimension\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xf4\r\n\x0f\x44\x61taQualityRule\x12W\n\x11range_expectation\x18\x01 \x01(\x0b\x32:.google.cloud.dataplex.v1.DataQualityRule.RangeExpectationH\x00\x12\\\n\x14non_null_expectation\x18\x02 \x01(\x0b\x32<.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectationH\x00\x12S\n\x0fset_expectation\x18\x03 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataQualityRule.SetExpectationH\x00\x12W\n\x11regex_expectation\x18\x04 \x01(\x0b\x32:.google.cloud.dataplex.v1.DataQualityRule.RegexExpectationH\x00\x12\x61\n\x16uniqueness_expectation\x18\x64 \x01(\x0b\x32?.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectationH\x00\x12j\n\x1bstatistic_range_expectation\x18\x65 \x01(\x0b\x32\x43.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectationH\x00\x12g\n\x19row_condition_expectation\x18\xc8\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectationH\x00\x12k\n\x1btable_condition_expectation\x18\xc9\x01 \x01(\x0b\x32\x43.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectationH\x00\x12P\n\rsql_assertion\x18\xca\x01 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DataQualityRule.SqlAssertionH\x00\x12\x14\n\x06\x63olumn\x18\xf4\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0bignore_null\x18\xf5\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x17\n\tdimension\x18\xf6\x03 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\tthreshold\x18\xf7\x03 \x01(\x01\x42\x03\xe0\x41\x01\x12\x12\n\x04name\x18\xf8\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0b\x64\x65scription\x18\xf9\x03 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x01\n\x10RangeExpectation\x12\x16\n\tmin_value\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tmax_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12strict_min_enabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12strict_max_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x14\n\x12NonNullExpectation\x1a%\n\x0eSetExpectation\x12\x13\n\x06values\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a&\n\x10RegexExpectation\x12\x12\n\x05regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x17\n\x15UniquenessExpectation\x1a\xc2\x02\n\x19StatisticRangeExpectation\x12k\n\tstatistic\x18\x01 \x01(\x0e\x32S.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatisticB\x03\xe0\x41\x01\x12\x16\n\tmin_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tmax_value\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12strict_min_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12strict_max_enabled\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"F\n\x0f\x43olumnStatistic\x12\x17\n\x13STATISTIC_UNDEFINED\x10\x00\x12\x08\n\x04MEAN\x10\x01\x12\x07\n\x03MIN\x10\x02\x12\x07\n\x03MAX\x10\x03\x1a\x36\n\x17RowConditionExpectation\x12\x1b\n\x0esql_expression\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x38\n\x19TableConditionExpectation\x12\x1b\n\x0esql_expression\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a*\n\x0cSqlAssertion\x12\x1a\n\rsql_statement\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x0b\n\trule_type\"Q\n\x17\x44\x61taQualityColumnResult\x12\x13\n\x06\x63olumn\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\x05score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x08\n\x06_scoreB\xc4\x01\n\x1c\x63om.google.cloud.dataplex.v1B\x10\x44\x61taQualityProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.dataplex.v1.ScannedData", "google/cloud/dataplex/v1/processing.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + DataQualitySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec").msgclass + DataQualitySpec::PostScanActions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions").msgclass + DataQualitySpec::PostScanActions::BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport").msgclass + DataQualitySpec::PostScanActions::Recipients = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients").msgclass + DataQualitySpec::PostScanActions::ScoreThresholdTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger").msgclass + DataQualitySpec::PostScanActions::JobFailureTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger").msgclass + DataQualitySpec::PostScanActions::JobEndTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger").msgclass + DataQualitySpec::PostScanActions::NotificationReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport").msgclass + DataQualityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult").msgclass + DataQualityResult::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult").msgclass + DataQualityResult::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult").msgclass + DataQualityResult::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State").enummodule + DataQualityRuleResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRuleResult").msgclass + DataQualityDimensionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityDimensionResult").msgclass + DataQualityDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityDimension").msgclass + DataQualityRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule").msgclass + DataQualityRule::RangeExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RangeExpectation").msgclass + DataQualityRule::NonNullExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation").msgclass + DataQualityRule::SetExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.SetExpectation").msgclass + DataQualityRule::RegexExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RegexExpectation").msgclass + DataQualityRule::UniquenessExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation").msgclass + DataQualityRule::StatisticRangeExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation").msgclass + DataQualityRule::StatisticRangeExpectation::ColumnStatistic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic").enummodule + DataQualityRule::RowConditionExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation").msgclass + DataQualityRule::TableConditionExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation").msgclass + DataQualityRule::SqlAssertion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.SqlAssertion").msgclass + DataQualityColumnResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityColumnResult").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb new file mode 100644 index 000000000000..9563fe840d55 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +require "google/cloud/dataplex/v1/data_scan_service/credentials" +require "google/cloud/dataplex/v1/data_scan_service/paths" +require "google/cloud/dataplex/v1/data_scan_service/operations" +require "google/cloud/dataplex/v1/data_scan_service/client" +require "google/cloud/dataplex/v1/data_scan_service/rest" + +module Google + module Cloud + module Dataplex + module 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. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/data_scan_service" + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dataplex/v1/data_scan_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + module DataScanService + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_scan_service", "helpers.rb" +require "google/cloud/dataplex/v1/data_scan_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb new file mode 100644 index 000000000000..eceda72aff4a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb @@ -0,0 +1,1329 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/datascans_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + ## + # Client for the DataScanService service. + # + # 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 Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_scan_service_stub + + ## + # Configure the DataScanService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataScanService clients + # ::Google::Cloud::Dataplex::V1::DataScanService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataScanService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_scan_service_stub.universe_domain + end + + ## + # Create a new DataScanService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataScanService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/datascans_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @data_scan_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::DataScanService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_scan_service_stub.endpoint + config.universe_domain = @data_scan_service_stub.universe_domain + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_scan_service_stub.endpoint + config.universe_domain = @data_scan_service_stub.universe_domain + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataScanService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Creates a DataScan resource. + # + # @overload create_data_scan(request, options = nil) + # Pass arguments to `create_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_scan(parent: nil, data_scan: nil, data_scan_id: nil, validate_only: nil) + # Pass arguments to `create_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] + # Required. DataScan resource. + # @param data_scan_id [::String] + # 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 validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new + # + # # Call the create_data_scan method. + # result = client.create_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :create_data_scan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataScan resource. + # + # @overload update_data_scan(request, options = nil) + # Pass arguments to `update_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_scan(data_scan: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] + # Required. DataScan resource to be updated. + # + # Only fields specified in `update_mask` are updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new + # + # # Call the update_data_scan method. + # result = client.update_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_scan&.name + header_params["data_scan.name"] = request.data_scan.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :update_data_scan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataScan resource. + # + # @overload delete_data_scan(request, options = nil) + # Pass arguments to `delete_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_scan(name: nil) + # Pass arguments to `delete_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new + # + # # Call the delete_data_scan method. + # result = client.delete_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :delete_data_scan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a DataScan resource. + # + # @overload get_data_scan(request, options = nil) + # Pass arguments to `get_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_scan(name: nil, view: nil) + # Pass arguments to `get_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] + # Optional. Select the DataScan view to return. Defaults to `BASIC`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataScan] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new + # + # # Call the get_data_scan method. + # result = client.get_data_scan request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. + # p result + # + def get_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :get_data_scan, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataScans. + # + # @overload list_data_scans(request, options = nil) + # Pass arguments to `list_data_scans` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataScansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_scans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_scans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new + # + # # Call the list_data_scans method. + # result = client.list_data_scans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. + # p item + # end + # + def list_data_scans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScansRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_scans.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_scans.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_scans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :list_data_scans, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scans, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Runs an on-demand execution of a DataScan + # + # @overload run_data_scan(request, options = nil) + # Pass arguments to `run_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::RunDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_data_scan(name: nil) + # Pass arguments to `run_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new + # + # # Call the run_data_scan method. + # result = client.run_data_scan request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. + # p result + # + def run_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_data_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :run_data_scan, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a DataScanJob resource. + # + # @overload get_data_scan_job(request, options = nil) + # Pass arguments to `get_data_scan_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataScanJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_scan_job(name: nil, view: nil) + # Pass arguments to `get_data_scan_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] + # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataScanJob] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScanJob] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new + # + # # Call the get_data_scan_job method. + # result = client.get_data_scan_job request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. + # p result + # + def get_data_scan_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_scan_job.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_scan_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_scan_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :get_data_scan_job, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataScanJobs under the given DataScan. + # + # @overload list_data_scan_jobs(request, options = nil) + # Pass arguments to `list_data_scan_jobs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_scan_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_scan_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new + # + # # Call the list_data_scan_jobs method. + # result = client.list_data_scan_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. + # p item + # end + # + def list_data_scan_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_scan_jobs.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_scan_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_scan_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :list_data_scan_jobs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Generates recommended DataQualityRule from a data profiling DataScan. + # + # @overload generate_data_quality_rules(request, options = nil) + # Pass arguments to `generate_data_quality_rules` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_data_quality_rules(name: nil) + # Pass arguments to `generate_data_quality_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name should be either + # * the name of a datascan with at least one successful completed data + # profiling job, or + # * the name of a successful completed data profiling datascan job. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new + # + # # Call the generate_data_quality_rules method. + # result = client.generate_data_quality_rules request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. + # p result + # + def generate_data_quality_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_data_quality_rules.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_data_quality_rules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_data_quality_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :generate_data_quality_rules, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataScanService API. + # + # This class represents the configuration for DataScanService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_scan to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataScanService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_scan.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_scan.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the DataScanService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_scan + ## + # RPC-specific configuration for `update_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_scan + ## + # RPC-specific configuration for `delete_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_scan + ## + # RPC-specific configuration for `get_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_scan + ## + # RPC-specific configuration for `list_data_scans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_scans + ## + # RPC-specific configuration for `run_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :run_data_scan + ## + # RPC-specific configuration for `get_data_scan_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_scan_job + ## + # RPC-specific configuration for `list_data_scan_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_scan_jobs + ## + # RPC-specific configuration for `generate_data_quality_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_data_quality_rules + + # @private + def initialize parent_rpcs = nil + create_data_scan_config = parent_rpcs.create_data_scan if parent_rpcs.respond_to? :create_data_scan + @create_data_scan = ::Gapic::Config::Method.new create_data_scan_config + update_data_scan_config = parent_rpcs.update_data_scan if parent_rpcs.respond_to? :update_data_scan + @update_data_scan = ::Gapic::Config::Method.new update_data_scan_config + delete_data_scan_config = parent_rpcs.delete_data_scan if parent_rpcs.respond_to? :delete_data_scan + @delete_data_scan = ::Gapic::Config::Method.new delete_data_scan_config + get_data_scan_config = parent_rpcs.get_data_scan if parent_rpcs.respond_to? :get_data_scan + @get_data_scan = ::Gapic::Config::Method.new get_data_scan_config + list_data_scans_config = parent_rpcs.list_data_scans if parent_rpcs.respond_to? :list_data_scans + @list_data_scans = ::Gapic::Config::Method.new list_data_scans_config + run_data_scan_config = parent_rpcs.run_data_scan if parent_rpcs.respond_to? :run_data_scan + @run_data_scan = ::Gapic::Config::Method.new run_data_scan_config + get_data_scan_job_config = parent_rpcs.get_data_scan_job if parent_rpcs.respond_to? :get_data_scan_job + @get_data_scan_job = ::Gapic::Config::Method.new get_data_scan_job_config + list_data_scan_jobs_config = parent_rpcs.list_data_scan_jobs if parent_rpcs.respond_to? :list_data_scan_jobs + @list_data_scan_jobs = ::Gapic::Config::Method.new list_data_scan_jobs_config + generate_data_quality_rules_config = parent_rpcs.generate_data_quality_rules if parent_rpcs.respond_to? :generate_data_quality_rules + @generate_data_quality_rules = ::Gapic::Config::Method.new generate_data_quality_rules_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb new file mode 100644 index 000000000000..51307cec4524 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + # Credentials for the DataScanService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb new file mode 100644 index 000000000000..6d49b74e9b13 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb @@ -0,0 +1,801 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataScanService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataScanService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb new file mode 100644 index 000000000000..1ba91d70b8d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb @@ -0,0 +1,113 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + # Path helper methods for the DataScanService API. + module Paths + ## + # Create a fully-qualified DataScan resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataScans/{dataScan}` + # + # @param project [String] + # @param location [String] + # @param dataScan [String] + # + # @return [::String] + def data_scan_path project:, location:, dataScan: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataScans/#{dataScan}" + end + + ## + # Create a fully-qualified DataScanJob resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}` + # + # @param project [String] + # @param location [String] + # @param dataScan [String] + # @param job [String] + # + # @return [::String] + def data_scan_job_path project:, location:, dataScan:, job: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "dataScan cannot contain /" if dataScan.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataScans/#{dataScan}/jobs/#{job}" + end + + ## + # Create a fully-qualified Entity resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # @param entity [String] + # + # @return [::String] + def entity_path project:, location:, lake:, zone:, entity: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb new file mode 100644 index 000000000000..bf498ab0f46b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/data_scan_service/credentials" +require "google/cloud/dataplex/v1/data_scan_service/paths" +require "google/cloud/dataplex/v1/data_scan_service/rest/operations" +require "google/cloud/dataplex/v1/data_scan_service/rest/client" + +module Google + module Cloud + module Dataplex + module 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. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/data_scan_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + module DataScanService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/data_scan_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb new file mode 100644 index 000000000000..29318d468576 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb @@ -0,0 +1,1248 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/datascans_pb" +require "google/cloud/dataplex/v1/data_scan_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + module Rest + ## + # REST client for the DataScanService service. + # + # 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 Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_scan_service_stub + + ## + # Configure the DataScanService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataScanService clients + # ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataScanService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_scan_service_stub.universe_domain + end + + ## + # Create a new DataScanService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataScanService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @data_scan_service_stub = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_scan_service_stub.endpoint + config.universe_domain = @data_scan_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_scan_service_stub.endpoint + config.universe_domain = @data_scan_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataScanService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Creates a DataScan resource. + # + # @overload create_data_scan(request, options = nil) + # Pass arguments to `create_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_scan(parent: nil, data_scan: nil, data_scan_id: nil, validate_only: nil) + # Pass arguments to `create_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] + # Required. DataScan resource. + # @param data_scan_id [::String] + # 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 validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new + # + # # Call the create_data_scan method. + # result = client.create_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_data_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.create_data_scan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataScan resource. + # + # @overload update_data_scan(request, options = nil) + # Pass arguments to `update_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_scan(data_scan: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] + # Required. DataScan resource to be updated. + # + # Only fields specified in `update_mask` are updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new + # + # # Call the update_data_scan method. + # result = client.update_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.update_data_scan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataScan resource. + # + # @overload delete_data_scan(request, options = nil) + # Pass arguments to `delete_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_scan(name: nil) + # Pass arguments to `delete_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new + # + # # Call the delete_data_scan method. + # result = client.delete_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_data_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.delete_data_scan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a DataScan resource. + # + # @overload get_data_scan(request, options = nil) + # Pass arguments to `get_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_scan(name: nil, view: nil) + # Pass arguments to `get_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] + # Optional. Select the DataScan view to return. Defaults to `BASIC`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new + # + # # Call the get_data_scan method. + # result = client.get_data_scan request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. + # p result + # + def get_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.get_data_scan request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataScans. + # + # @overload list_data_scans(request, options = nil) + # Pass arguments to `list_data_scans` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataScansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_scans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_scans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScansResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataScansResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new + # + # # Call the list_data_scans method. + # result = client.list_data_scans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. + # p item + # end + # + def list_data_scans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScansRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_scans.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_scans.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_scans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.list_data_scans request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Runs an on-demand execution of a DataScan + # + # @overload run_data_scan(request, options = nil) + # Pass arguments to `run_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::RunDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_data_scan(name: nil) + # Pass arguments to `run_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new + # + # # Call the run_data_scan method. + # result = client.run_data_scan request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. + # p result + # + def run_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.run_data_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.run_data_scan request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a DataScanJob resource. + # + # @overload get_data_scan_job(request, options = nil) + # Pass arguments to `get_data_scan_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataScanJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_scan_job(name: nil, view: nil) + # Pass arguments to `get_data_scan_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] + # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScanJob] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScanJob] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new + # + # # Call the get_data_scan_job method. + # result = client.get_data_scan_job request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. + # p result + # + def get_data_scan_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_scan_job.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_scan_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_scan_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.get_data_scan_job request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataScanJobs under the given DataScan. + # + # @overload list_data_scan_jobs(request, options = nil) + # Pass arguments to `list_data_scan_jobs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_scan_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_scan_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new + # + # # Call the list_data_scan_jobs method. + # result = client.list_data_scan_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. + # p item + # end + # + def list_data_scan_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_scan_jobs.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_scan_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_scan_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.list_data_scan_jobs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, "data_scan_jobs", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Generates recommended DataQualityRule from a data profiling DataScan. + # + # @overload generate_data_quality_rules(request, options = nil) + # Pass arguments to `generate_data_quality_rules` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload generate_data_quality_rules(name: nil) + # Pass arguments to `generate_data_quality_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name should be either + # * the name of a datascan with at least one successful completed data + # profiling job, or + # * the name of a successful completed data profiling datascan job. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new + # + # # Call the generate_data_quality_rules method. + # result = client.generate_data_quality_rules request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. + # p result + # + def generate_data_quality_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.generate_data_quality_rules.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.generate_data_quality_rules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_data_quality_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.generate_data_quality_rules request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataScanService REST API. + # + # This class represents the configuration for DataScanService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_scan to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_scan.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_scan.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the DataScanService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_scan + ## + # RPC-specific configuration for `update_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_scan + ## + # RPC-specific configuration for `delete_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_scan + ## + # RPC-specific configuration for `get_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_scan + ## + # RPC-specific configuration for `list_data_scans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_scans + ## + # RPC-specific configuration for `run_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :run_data_scan + ## + # RPC-specific configuration for `get_data_scan_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_scan_job + ## + # RPC-specific configuration for `list_data_scan_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_scan_jobs + ## + # RPC-specific configuration for `generate_data_quality_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_data_quality_rules + + # @private + def initialize parent_rpcs = nil + create_data_scan_config = parent_rpcs.create_data_scan if parent_rpcs.respond_to? :create_data_scan + @create_data_scan = ::Gapic::Config::Method.new create_data_scan_config + update_data_scan_config = parent_rpcs.update_data_scan if parent_rpcs.respond_to? :update_data_scan + @update_data_scan = ::Gapic::Config::Method.new update_data_scan_config + delete_data_scan_config = parent_rpcs.delete_data_scan if parent_rpcs.respond_to? :delete_data_scan + @delete_data_scan = ::Gapic::Config::Method.new delete_data_scan_config + get_data_scan_config = parent_rpcs.get_data_scan if parent_rpcs.respond_to? :get_data_scan + @get_data_scan = ::Gapic::Config::Method.new get_data_scan_config + list_data_scans_config = parent_rpcs.list_data_scans if parent_rpcs.respond_to? :list_data_scans + @list_data_scans = ::Gapic::Config::Method.new list_data_scans_config + run_data_scan_config = parent_rpcs.run_data_scan if parent_rpcs.respond_to? :run_data_scan + @run_data_scan = ::Gapic::Config::Method.new run_data_scan_config + get_data_scan_job_config = parent_rpcs.get_data_scan_job if parent_rpcs.respond_to? :get_data_scan_job + @get_data_scan_job = ::Gapic::Config::Method.new get_data_scan_job_config + list_data_scan_jobs_config = parent_rpcs.list_data_scan_jobs if parent_rpcs.respond_to? :list_data_scan_jobs + @list_data_scan_jobs = ::Gapic::Config::Method.new list_data_scan_jobs_config + generate_data_quality_rules_config = parent_rpcs.generate_data_quality_rules if parent_rpcs.respond_to? :generate_data_quality_rules + @generate_data_quality_rules = ::Gapic::Config::Method.new generate_data_quality_rules_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb new file mode 100644 index 000000000000..9c664a2eee4e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb @@ -0,0 +1,895 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataScanService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataScanService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb new file mode 100644 index 000000000000..2ff5a60c134c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb @@ -0,0 +1,612 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/datascans_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + module Rest + ## + # REST service stub for the DataScanService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the create_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # A result object deserialized from the server's reply + def get_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataScan.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_data_scans REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScansRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScansResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataScansResponse] + # A result object deserialized from the server's reply + def list_data_scans request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_scans_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the run_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::RunDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # A result object deserialized from the server's reply + def run_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_data_scan_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScanJob] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScanJob] + # A result object deserialized from the server's reply + def get_data_scan_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_scan_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataScanJob.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_data_scan_jobs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse] + # A result object deserialized from the server's reply + def list_data_scan_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_scan_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the generate_data_quality_rules REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # A result object deserialized from the server's reply + def generate_data_quality_rules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_data_quality_rules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataScans", + body: "data_scan", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_scan.name}", + body: "data_scan", + matches: [ + ["data_scan.name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_scans REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScansRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_scans_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataScans", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::RunDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:run", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_scan_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_scan_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_scan_jobs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_scan_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/jobs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_data_quality_rules REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_generate_data_quality_rules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:generateDataQualityRules", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:generateDataQualityRules", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb new file mode 100644 index 000000000000..6d32d95fb76b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/data_taxonomy.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/security_pb' +require 'google/cloud/dataplex/v1/service_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/cloud/dataplex/v1/data_taxonomy.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/dataplex/v1/security.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x04\n\x0c\x44\x61taTaxonomy\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12G\n\x06labels\x18\x08 \x03(\x0b\x32\x32.google.cloud.dataplex.v1.DataTaxonomy.LabelsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0f\x61ttribute_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\n \x01(\t\x12\x18\n\x0b\x63lass_count\x18\x0b \x01(\x05\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n$dataplex.googleapis.com/DataTaxonomy\x12Iprojects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}\"\x94\x06\n\rDataAttribute\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12H\n\x06labels\x18\x07 \x03(\x0b\x32\x33.google.cloud.dataplex.v1.DataAttribute.LabelsEntryB\x03\xe0\x41\x01\x12@\n\tparent_id\x18\x08 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12\x1c\n\x0f\x61ttribute_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\n \x01(\t\x12O\n\x14resource_access_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.ResourceAccessSpecB\x03\xe0\x41\x01\x12G\n\x10\x64\x61ta_access_spec\x18\x65 \x01(\x0b\x32(.google.cloud.dataplex.v1.DataAccessSpecB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x91\x01\xea\x41\x8d\x01\n%dataplex.googleapis.com/DataAttribute\x12\x64projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}\"\xc7\x06\n\x14\x44\x61taAttributeBinding\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x03\xfa\x41.\n,dataplex.googleapis.com/DataAttributeBinding\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12O\n\x06labels\x18\x07 \x03(\x0b\x32:.google.cloud.dataplex.v1.DataAttributeBinding.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12\x1a\n\x08resource\x18\x64 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x41\n\nattributes\x18n \x03(\tB-\xe0\x41\x01\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12G\n\x05paths\x18x \x03(\x0b\x32\x33.google.cloud.dataplex.v1.DataAttributeBinding.PathB\x03\xe0\x41\x01\x1a\\\n\x04Path\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\nattributes\x18\x02 \x03(\tB-\xe0\x41\x01\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8d\x01\xea\x41\x89\x01\n,dataplex.googleapis.com/DataAttributeBinding\x12Yprojects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}B\x14\n\x12resource_reference\"\xd5\x01\n\x19\x43reateDataTaxonomyRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1d\n\x10\x64\x61ta_taxonomy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\rdata_taxonomy\x18\x03 \x01(\x0b\x32&.google.cloud.dataplex.v1.DataTaxonomyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n\x19UpdateDataTaxonomyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x42\n\rdata_taxonomy\x18\x02 \x01(\x0b\x32&.google.cloud.dataplex.v1.DataTaxonomyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"T\n\x16GetDataTaxonomyRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\"\xb3\x01\n\x19ListDataTaxonomiesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x95\x01\n\x1aListDataTaxonomiesResponse\x12?\n\x0f\x64\x61ta_taxonomies\x18\x01 \x03(\x0b\x32&.google.cloud.dataplex.v1.DataTaxonomy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"j\n\x19\x44\x65leteDataTaxonomyRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xdc\x01\n\x1a\x43reateDataAttributeRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x1e\n\x11\x64\x61ta_attribute_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x0e\x64\x61ta_attribute\x18\x03 \x01(\x0b\x32\'.google.cloud.dataplex.v1.DataAttributeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xb4\x01\n\x1aUpdateDataAttributeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x44\n\x0e\x64\x61ta_attribute\x18\x02 \x01(\x0b\x32\'.google.cloud.dataplex.v1.DataAttributeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"V\n\x17GetDataAttributeRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\"\xb6\x01\n\x19ListDataAttributesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1aListDataAttributesResponse\x12@\n\x0f\x64\x61ta_attributes\x18\x01 \x03(\x0b\x32\'.google.cloud.dataplex.v1.DataAttribute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"l\n\x1a\x44\x65leteDataAttributeRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xf7\x01\n!CreateDataAttributeBindingRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12&\n\x19\x64\x61ta_attribute_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12S\n\x16\x64\x61ta_attribute_binding\x18\x03 \x01(\x0b\x32..google.cloud.dataplex.v1.DataAttributeBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xca\x01\n!UpdateDataAttributeBindingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12S\n\x16\x64\x61ta_attribute_binding\x18\x02 \x01(\x0b\x32..google.cloud.dataplex.v1.DataAttributeBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"d\n\x1eGetDataAttributeBindingRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,dataplex.googleapis.com/DataAttributeBinding\"\xba\x01\n ListDataAttributeBindingsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n!ListDataAttributeBindingsResponse\x12O\n\x17\x64\x61ta_attribute_bindings\x18\x01 \x03(\x0b\x32..google.cloud.dataplex.v1.DataAttributeBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"z\n!DeleteDataAttributeBindingRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,dataplex.googleapis.com/DataAttributeBinding\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\x32\x8b\x1d\n\x13\x44\x61taTaxonomyService\x12\x80\x02\n\x12\x43reateDataTaxonomy\x12\x33.google.cloud.dataplex.v1.CreateDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41!\n\x0c\x44\x61taTaxonomy\x12\x11OperationMetadata\xda\x41%parent,data_taxonomy,data_taxonomy_id\x82\xd3\xe4\x93\x02\x43\"2/v1/{parent=projects/*/locations/*}/dataTaxonomies:\rdata_taxonomy\x12\x82\x02\n\x12UpdateDataTaxonomy\x12\x33.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"\x97\x01\xca\x41!\n\x0c\x44\x61taTaxonomy\x12\x11OperationMetadata\xda\x41\x19\x64\x61ta_taxonomy,update_mask\x82\xd3\xe4\x93\x02Q2@/v1/{data_taxonomy.name=projects/*/locations/*/dataTaxonomies/*}:\rdata_taxonomy\x12\xd8\x01\n\x12\x44\x65leteDataTaxonomy\x12\x33.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/dataTaxonomies/*}\x12\xc4\x01\n\x12ListDataTaxonomies\x12\x33.google.cloud.dataplex.v1.ListDataTaxonomiesRequest\x1a\x34.google.cloud.dataplex.v1.ListDataTaxonomiesResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/dataTaxonomies\x12\xae\x01\n\x0fGetDataTaxonomy\x12\x30.google.cloud.dataplex.v1.GetDataTaxonomyRequest\x1a&.google.cloud.dataplex.v1.DataTaxonomy\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/dataTaxonomies/*}\x12\xba\x02\n\x1a\x43reateDataAttributeBinding\x12;.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41)\n\x14\x44\x61taAttributeBinding\x12\x11OperationMetadata\xda\x41\x37parent,data_attribute_binding,data_attribute_binding_id\x82\xd3\xe4\x93\x02S\"9/v1/{parent=projects/*/locations/*}/dataAttributeBindings:\x16\x64\x61ta_attribute_binding\x12\xbc\x02\n\x1aUpdateDataAttributeBinding\x12;.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41)\n\x14\x44\x61taAttributeBinding\x12\x11OperationMetadata\xda\x41\"data_attribute_binding,update_mask\x82\xd3\xe4\x93\x02j2P/v1/{data_attribute_binding.name=projects/*/locations/*/dataAttributeBindings/*}:\x16\x64\x61ta_attribute_binding\x12\xef\x01\n\x1a\x44\x65leteDataAttributeBinding\x12;.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/dataAttributeBindings/*}\x12\xe0\x01\n\x19ListDataAttributeBindings\x12:.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest\x1a;.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*}/dataAttributeBindings\x12\xcd\x01\n\x17GetDataAttributeBinding\x12\x38.google.cloud.dataplex.v1.GetDataAttributeBindingRequest\x1a..google.cloud.dataplex.v1.DataAttributeBinding\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/dataAttributeBindings/*}\x12\x93\x02\n\x13\x43reateDataAttribute\x12\x34.google.cloud.dataplex.v1.CreateDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41\"\n\rDataAttribute\x12\x11OperationMetadata\xda\x41\'parent,data_attribute,data_attribute_id\x82\xd3\xe4\x93\x02Q\"?/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes:\x0e\x64\x61ta_attribute\x12\x95\x02\n\x13UpdateDataAttribute\x12\x34.google.cloud.dataplex.v1.UpdateDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41\"\n\rDataAttribute\x12\x11OperationMetadata\xda\x41\x1a\x64\x61ta_attribute,update_mask\x82\xd3\xe4\x93\x02`2N/v1/{data_attribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}:\x0e\x64\x61ta_attribute\x12\xe7\x01\n\x13\x44\x65leteDataAttribute\x12\x34.google.cloud.dataplex.v1.DeleteDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}\x12\xd1\x01\n\x12ListDataAttributes\x12\x33.google.cloud.dataplex.v1.ListDataAttributesRequest\x1a\x34.google.cloud.dataplex.v1.ListDataAttributesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes\x12\xbe\x01\n\x10GetDataAttribute\x12\x31.google.cloud.dataplex.v1.GetDataAttributeRequest\x1a\'.google.cloud.dataplex.v1.DataAttribute\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBm\n\x1c\x63om.google.cloud.dataplex.v1B\x11\x44\x61taTaxonomyProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.dataplex.v1.ResourceAccessSpec", "google/cloud/dataplex/v1/security.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + DataTaxonomy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataTaxonomy").msgclass + DataAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttribute").msgclass + DataAttributeBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttributeBinding").msgclass + DataAttributeBinding::Path = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttributeBinding.Path").msgclass + CreateDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataTaxonomyRequest").msgclass + UpdateDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataTaxonomyRequest").msgclass + GetDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataTaxonomyRequest").msgclass + ListDataTaxonomiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataTaxonomiesRequest").msgclass + ListDataTaxonomiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataTaxonomiesResponse").msgclass + DeleteDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataTaxonomyRequest").msgclass + CreateDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataAttributeRequest").msgclass + UpdateDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataAttributeRequest").msgclass + GetDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataAttributeRequest").msgclass + ListDataAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributesRequest").msgclass + ListDataAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributesResponse").msgclass + DeleteDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataAttributeRequest").msgclass + CreateDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataAttributeBindingRequest").msgclass + UpdateDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest").msgclass + GetDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataAttributeBindingRequest").msgclass + ListDataAttributeBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributeBindingsRequest").msgclass + ListDataAttributeBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributeBindingsResponse").msgclass + DeleteDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb new file mode 100644 index 000000000000..12feb1928fc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +require "google/cloud/dataplex/v1/data_taxonomy_service/credentials" +require "google/cloud/dataplex/v1/data_taxonomy_service/paths" +require "google/cloud/dataplex/v1/data_taxonomy_service/operations" +require "google/cloud/dataplex/v1/data_taxonomy_service/client" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest" + +module Google + module Cloud + module Dataplex + module V1 + ## + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/data_taxonomy_service" + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dataplex/v1/data_taxonomy_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + module DataTaxonomyService + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_taxonomy_service", "helpers.rb" +require "google/cloud/dataplex/v1/data_taxonomy_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb new file mode 100644 index 000000000000..c516748b8f4e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb @@ -0,0 +1,1966 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/data_taxonomy_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + ## + # Client for the DataTaxonomyService service. + # + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + # + class Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_taxonomy_service_stub + + ## + # Configure the DataTaxonomyService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataTaxonomyService clients + # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTaxonomyService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_taxonomy_service_stub.universe_domain + end + + ## + # Create a new DataTaxonomyService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataTaxonomyService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/data_taxonomy_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @data_taxonomy_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_taxonomy_service_stub.endpoint + config.universe_domain = @data_taxonomy_service_stub.universe_domain + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_taxonomy_service_stub.endpoint + config.universe_domain = @data_taxonomy_service_stub.universe_domain + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Create a DataTaxonomy resource. + # + # @overload create_data_taxonomy(request, options = nil) + # Pass arguments to `create_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_taxonomy(parent: nil, data_taxonomy_id: nil, data_taxonomy: nil, validate_only: nil) + # Pass arguments to `create_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 data_taxonomy_id [::String] + # 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 data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] + # Required. DataTaxonomy resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new + # + # # Call the create_data_taxonomy method. + # result = client.create_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_taxonomy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :create_data_taxonomy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataTaxonomy resource. + # + # @overload update_data_taxonomy(request, options = nil) + # Pass arguments to `update_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_taxonomy(update_mask: nil, data_taxonomy: nil, validate_only: nil) + # Pass arguments to `update_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new + # + # # Call the update_data_taxonomy method. + # result = client.update_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_taxonomy&.name + header_params["data_taxonomy.name"] = request.data_taxonomy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_taxonomy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :update_data_taxonomy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy + # must be deleted before the DataTaxonomy can be deleted. + # + # @overload delete_data_taxonomy(request, options = nil) + # Pass arguments to `delete_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_taxonomy(name: nil, etag: nil) + # Pass arguments to `delete_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value,the DeleteDataTaxonomy method returns an ABORTED error. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new + # + # # Call the delete_data_taxonomy method. + # result = client.delete_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_taxonomy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :delete_data_taxonomy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataTaxonomy resources in a project and location. + # + # @overload list_data_taxonomies(request, options = nil) + # Pass arguments to `list_data_taxonomies` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_taxonomies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new + # + # # Call the list_data_taxonomies method. + # result = client.list_data_taxonomies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. + # p item + # end + # + def list_data_taxonomies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_taxonomies.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_taxonomies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_taxonomies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :list_data_taxonomies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_taxonomies, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a DataTaxonomy resource. + # + # @overload get_data_taxonomy(request, options = nil) + # Pass arguments to `get_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_taxonomy(name: nil) + # Pass arguments to `get_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new + # + # # Call the get_data_taxonomy method. + # result = client.get_data_taxonomy request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. + # p result + # + def get_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_taxonomy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :get_data_taxonomy, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a DataAttributeBinding resource. + # + # @overload create_data_attribute_binding(request, options = nil) + # Pass arguments to `create_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_attribute_binding(parent: nil, data_attribute_binding_id: nil, data_attribute_binding: nil, validate_only: nil) + # Pass arguments to `create_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id} + # @param data_attribute_binding_id [::String] + # 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 data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] + # Required. DataAttributeBinding resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new + # + # # Call the create_data_attribute_binding method. + # result = client.create_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_attribute_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :create_data_attribute_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataAttributeBinding resource. + # + # @overload update_data_attribute_binding(request, options = nil) + # Pass arguments to `update_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_attribute_binding(update_mask: nil, data_attribute_binding: nil, validate_only: nil) + # Pass arguments to `update_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new + # + # # Call the update_data_attribute_binding method. + # result = client.update_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_attribute_binding&.name + header_params["data_attribute_binding.name"] = request.data_attribute_binding.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_attribute_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :update_data_attribute_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataAttributeBinding resource. All attributes within the + # DataAttributeBinding must be deleted before the DataAttributeBinding can be + # deleted. + # + # @overload delete_data_attribute_binding(request, options = nil) + # Pass arguments to `delete_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_attribute_binding(name: nil, etag: nil) + # Pass arguments to `delete_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # @param etag [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new + # + # # Call the delete_data_attribute_binding method. + # result = client.delete_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_attribute_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :delete_data_attribute_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataAttributeBinding resources in a project and location. + # + # @overload list_data_attribute_bindings(request, options = nil) + # Pass arguments to `list_data_attribute_bindings` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_attribute_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_attribute_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the Location: + # projects/\\{project_number}/locations/\\{location_id} + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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 order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new + # + # # Call the list_data_attribute_bindings method. + # result = client.list_data_attribute_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. + # p item + # end + # + def list_data_attribute_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_attribute_bindings.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_attribute_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_attribute_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :list_data_attribute_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attribute_bindings, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a DataAttributeBinding resource. + # + # @overload get_data_attribute_binding(request, options = nil) + # Pass arguments to `get_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_attribute_binding(name: nil) + # Pass arguments to `get_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new + # + # # Call the get_data_attribute_binding method. + # result = client.get_data_attribute_binding request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. + # p result + # + def get_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_attribute_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :get_data_attribute_binding, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a DataAttribute resource. + # + # @overload create_data_attribute(request, options = nil) + # Pass arguments to `create_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_attribute(parent: nil, data_attribute_id: nil, data_attribute: nil, validate_only: nil) + # Pass arguments to `create_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param data_attribute_id [::String] + # 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 data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] + # Required. DataAttribute resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new + # + # # Call the create_data_attribute method. + # result = client.create_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_attribute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :create_data_attribute, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataAttribute resource. + # + # @overload update_data_attribute(request, options = nil) + # Pass arguments to `update_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_attribute(update_mask: nil, data_attribute: nil, validate_only: nil) + # Pass arguments to `update_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new + # + # # Call the update_data_attribute method. + # result = client.update_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_attribute&.name + header_params["data_attribute.name"] = request.data_attribute.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_attribute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :update_data_attribute, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Data Attribute resource. + # + # @overload delete_data_attribute(request, options = nil) + # Pass arguments to `delete_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_attribute(name: nil, etag: nil) + # Pass arguments to `delete_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteDataAttribute method returns an ABORTED error response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new + # + # # Call the delete_data_attribute method. + # result = client.delete_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_attribute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :delete_data_attribute, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Data Attribute resources in a DataTaxonomy. + # + # @overload list_data_attributes(request, options = nil) + # Pass arguments to `list_data_attributes` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataAttributesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_attributes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_attributes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new + # + # # Call the list_data_attributes method. + # result = client.list_data_attributes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. + # p item + # end + # + def list_data_attributes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_attributes.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_attributes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_attributes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :list_data_attributes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attributes, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a Data Attribute resource. + # + # @overload get_data_attribute(request, options = nil) + # Pass arguments to `get_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_attribute(name: nil) + # Pass arguments to `get_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataAttribute] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new + # + # # Call the get_data_attribute method. + # result = client.get_data_attribute request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. + # p result + # + def get_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_attribute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :get_data_attribute, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataTaxonomyService API. + # + # This class represents the configuration for DataTaxonomyService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_taxonomy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_taxonomy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_taxonomy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the DataTaxonomyService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_taxonomy + ## + # RPC-specific configuration for `update_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_taxonomy + ## + # RPC-specific configuration for `delete_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_taxonomy + ## + # RPC-specific configuration for `list_data_taxonomies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_taxonomies + ## + # RPC-specific configuration for `get_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_taxonomy + ## + # RPC-specific configuration for `create_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_attribute_binding + ## + # RPC-specific configuration for `update_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_attribute_binding + ## + # RPC-specific configuration for `delete_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_attribute_binding + ## + # RPC-specific configuration for `list_data_attribute_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_attribute_bindings + ## + # RPC-specific configuration for `get_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_attribute_binding + ## + # RPC-specific configuration for `create_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_attribute + ## + # RPC-specific configuration for `update_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_attribute + ## + # RPC-specific configuration for `delete_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_attribute + ## + # RPC-specific configuration for `list_data_attributes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_attributes + ## + # RPC-specific configuration for `get_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_attribute + + # @private + def initialize parent_rpcs = nil + create_data_taxonomy_config = parent_rpcs.create_data_taxonomy if parent_rpcs.respond_to? :create_data_taxonomy + @create_data_taxonomy = ::Gapic::Config::Method.new create_data_taxonomy_config + update_data_taxonomy_config = parent_rpcs.update_data_taxonomy if parent_rpcs.respond_to? :update_data_taxonomy + @update_data_taxonomy = ::Gapic::Config::Method.new update_data_taxonomy_config + delete_data_taxonomy_config = parent_rpcs.delete_data_taxonomy if parent_rpcs.respond_to? :delete_data_taxonomy + @delete_data_taxonomy = ::Gapic::Config::Method.new delete_data_taxonomy_config + list_data_taxonomies_config = parent_rpcs.list_data_taxonomies if parent_rpcs.respond_to? :list_data_taxonomies + @list_data_taxonomies = ::Gapic::Config::Method.new list_data_taxonomies_config + get_data_taxonomy_config = parent_rpcs.get_data_taxonomy if parent_rpcs.respond_to? :get_data_taxonomy + @get_data_taxonomy = ::Gapic::Config::Method.new get_data_taxonomy_config + create_data_attribute_binding_config = parent_rpcs.create_data_attribute_binding if parent_rpcs.respond_to? :create_data_attribute_binding + @create_data_attribute_binding = ::Gapic::Config::Method.new create_data_attribute_binding_config + update_data_attribute_binding_config = parent_rpcs.update_data_attribute_binding if parent_rpcs.respond_to? :update_data_attribute_binding + @update_data_attribute_binding = ::Gapic::Config::Method.new update_data_attribute_binding_config + delete_data_attribute_binding_config = parent_rpcs.delete_data_attribute_binding if parent_rpcs.respond_to? :delete_data_attribute_binding + @delete_data_attribute_binding = ::Gapic::Config::Method.new delete_data_attribute_binding_config + list_data_attribute_bindings_config = parent_rpcs.list_data_attribute_bindings if parent_rpcs.respond_to? :list_data_attribute_bindings + @list_data_attribute_bindings = ::Gapic::Config::Method.new list_data_attribute_bindings_config + get_data_attribute_binding_config = parent_rpcs.get_data_attribute_binding if parent_rpcs.respond_to? :get_data_attribute_binding + @get_data_attribute_binding = ::Gapic::Config::Method.new get_data_attribute_binding_config + create_data_attribute_config = parent_rpcs.create_data_attribute if parent_rpcs.respond_to? :create_data_attribute + @create_data_attribute = ::Gapic::Config::Method.new create_data_attribute_config + update_data_attribute_config = parent_rpcs.update_data_attribute if parent_rpcs.respond_to? :update_data_attribute + @update_data_attribute = ::Gapic::Config::Method.new update_data_attribute_config + delete_data_attribute_config = parent_rpcs.delete_data_attribute if parent_rpcs.respond_to? :delete_data_attribute + @delete_data_attribute = ::Gapic::Config::Method.new delete_data_attribute_config + list_data_attributes_config = parent_rpcs.list_data_attributes if parent_rpcs.respond_to? :list_data_attributes + @list_data_attributes = ::Gapic::Config::Method.new list_data_attributes_config + get_data_attribute_config = parent_rpcs.get_data_attribute if parent_rpcs.respond_to? :get_data_attribute + @get_data_attribute = ::Gapic::Config::Method.new get_data_attribute_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb new file mode 100644 index 000000000000..58c35cc846da --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + # Credentials for the DataTaxonomyService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb new file mode 100644 index 000000000000..4d0a0a769ebd --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb @@ -0,0 +1,801 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataTaxonomyService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTaxonomyService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb new file mode 100644 index 000000000000..24ff999c274b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + # Path helper methods for the DataTaxonomyService API. + module Paths + ## + # Create a fully-qualified DataAttribute resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}` + # + # @param project [String] + # @param location [String] + # @param dataTaxonomy [String] + # @param data_attribute_id [String] + # + # @return [::String] + def data_attribute_path project:, location:, dataTaxonomy:, data_attribute_id: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "dataTaxonomy cannot contain /" if dataTaxonomy.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataTaxonomies/#{dataTaxonomy}/attributes/#{data_attribute_id}" + end + + ## + # Create a fully-qualified DataAttributeBinding resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}` + # + # @param project [String] + # @param location [String] + # @param data_attribute_binding_id [String] + # + # @return [::String] + def data_attribute_binding_path project:, location:, data_attribute_binding_id: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataAttributeBindings/#{data_attribute_binding_id}" + end + + ## + # Create a fully-qualified DataTaxonomy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}` + # + # @param project [String] + # @param location [String] + # @param data_taxonomy_id [String] + # + # @return [::String] + def data_taxonomy_path project:, location:, data_taxonomy_id: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataTaxonomies/#{data_taxonomy_id}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb new file mode 100644 index 000000000000..9662b3d8beed --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/data_taxonomy_service/credentials" +require "google/cloud/dataplex/v1/data_taxonomy_service/paths" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest/operations" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest/client" + +module Google + module Cloud + module Dataplex + module V1 + ## + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/data_taxonomy_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + module DataTaxonomyService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb new file mode 100644 index 000000000000..ee63c2241640 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb @@ -0,0 +1,1841 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/data_taxonomy_pb" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + module Rest + ## + # REST client for the DataTaxonomyService service. + # + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + # + class Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_taxonomy_service_stub + + ## + # Configure the DataTaxonomyService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataTaxonomyService clients + # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTaxonomyService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_taxonomy_service_stub.universe_domain + end + + ## + # Create a new DataTaxonomyService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataTaxonomyService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @data_taxonomy_service_stub = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_taxonomy_service_stub.endpoint + config.universe_domain = @data_taxonomy_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_taxonomy_service_stub.endpoint + config.universe_domain = @data_taxonomy_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Create a DataTaxonomy resource. + # + # @overload create_data_taxonomy(request, options = nil) + # Pass arguments to `create_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_taxonomy(parent: nil, data_taxonomy_id: nil, data_taxonomy: nil, validate_only: nil) + # Pass arguments to `create_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 data_taxonomy_id [::String] + # 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 data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] + # Required. DataTaxonomy resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new + # + # # Call the create_data_taxonomy method. + # result = client.create_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_data_taxonomy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.create_data_taxonomy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataTaxonomy resource. + # + # @overload update_data_taxonomy(request, options = nil) + # Pass arguments to `update_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_taxonomy(update_mask: nil, data_taxonomy: nil, validate_only: nil) + # Pass arguments to `update_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new + # + # # Call the update_data_taxonomy method. + # result = client.update_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_taxonomy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.update_data_taxonomy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy + # must be deleted before the DataTaxonomy can be deleted. + # + # @overload delete_data_taxonomy(request, options = nil) + # Pass arguments to `delete_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_taxonomy(name: nil, etag: nil) + # Pass arguments to `delete_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value,the DeleteDataTaxonomy method returns an ABORTED error. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new + # + # # Call the delete_data_taxonomy method. + # result = client.delete_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_data_taxonomy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.delete_data_taxonomy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataTaxonomy resources in a project and location. + # + # @overload list_data_taxonomies(request, options = nil) + # Pass arguments to `list_data_taxonomies` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_taxonomies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new + # + # # Call the list_data_taxonomies method. + # result = client.list_data_taxonomies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. + # p item + # end + # + def list_data_taxonomies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_taxonomies.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_taxonomies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_taxonomies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.list_data_taxonomies request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a DataTaxonomy resource. + # + # @overload get_data_taxonomy(request, options = nil) + # Pass arguments to `get_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_taxonomy(name: nil) + # Pass arguments to `get_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new + # + # # Call the get_data_taxonomy method. + # result = client.get_data_taxonomy request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. + # p result + # + def get_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_taxonomy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.get_data_taxonomy request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a DataAttributeBinding resource. + # + # @overload create_data_attribute_binding(request, options = nil) + # Pass arguments to `create_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_attribute_binding(parent: nil, data_attribute_binding_id: nil, data_attribute_binding: nil, validate_only: nil) + # Pass arguments to `create_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id} + # @param data_attribute_binding_id [::String] + # 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 data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] + # Required. DataAttributeBinding resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new + # + # # Call the create_data_attribute_binding method. + # result = client.create_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_data_attribute_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.create_data_attribute_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataAttributeBinding resource. + # + # @overload update_data_attribute_binding(request, options = nil) + # Pass arguments to `update_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_attribute_binding(update_mask: nil, data_attribute_binding: nil, validate_only: nil) + # Pass arguments to `update_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new + # + # # Call the update_data_attribute_binding method. + # result = client.update_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_attribute_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.update_data_attribute_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataAttributeBinding resource. All attributes within the + # DataAttributeBinding must be deleted before the DataAttributeBinding can be + # deleted. + # + # @overload delete_data_attribute_binding(request, options = nil) + # Pass arguments to `delete_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_attribute_binding(name: nil, etag: nil) + # Pass arguments to `delete_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # @param etag [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new + # + # # Call the delete_data_attribute_binding method. + # result = client.delete_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_data_attribute_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.delete_data_attribute_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataAttributeBinding resources in a project and location. + # + # @overload list_data_attribute_bindings(request, options = nil) + # Pass arguments to `list_data_attribute_bindings` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_attribute_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_attribute_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the Location: + # projects/\\{project_number}/locations/\\{location_id} + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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 order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new + # + # # Call the list_data_attribute_bindings method. + # result = client.list_data_attribute_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. + # p item + # end + # + def list_data_attribute_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_attribute_bindings.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_attribute_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_attribute_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.list_data_attribute_bindings request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a DataAttributeBinding resource. + # + # @overload get_data_attribute_binding(request, options = nil) + # Pass arguments to `get_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_attribute_binding(name: nil) + # Pass arguments to `get_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new + # + # # Call the get_data_attribute_binding method. + # result = client.get_data_attribute_binding request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. + # p result + # + def get_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_attribute_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.get_data_attribute_binding request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a DataAttribute resource. + # + # @overload create_data_attribute(request, options = nil) + # Pass arguments to `create_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_attribute(parent: nil, data_attribute_id: nil, data_attribute: nil, validate_only: nil) + # Pass arguments to `create_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param data_attribute_id [::String] + # 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 data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] + # Required. DataAttribute resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new + # + # # Call the create_data_attribute method. + # result = client.create_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_data_attribute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.create_data_attribute request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataAttribute resource. + # + # @overload update_data_attribute(request, options = nil) + # Pass arguments to `update_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_attribute(update_mask: nil, data_attribute: nil, validate_only: nil) + # Pass arguments to `update_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new + # + # # Call the update_data_attribute method. + # result = client.update_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_attribute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.update_data_attribute request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Data Attribute resource. + # + # @overload delete_data_attribute(request, options = nil) + # Pass arguments to `delete_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_attribute(name: nil, etag: nil) + # Pass arguments to `delete_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteDataAttribute method returns an ABORTED error response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new + # + # # Call the delete_data_attribute method. + # result = client.delete_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_data_attribute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.delete_data_attribute request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Data Attribute resources in a DataTaxonomy. + # + # @overload list_data_attributes(request, options = nil) + # Pass arguments to `list_data_attributes` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataAttributesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_attributes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_attributes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new + # + # # Call the list_data_attributes method. + # result = client.list_data_attributes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. + # p item + # end + # + def list_data_attributes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_attributes.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_attributes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_attributes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.list_data_attributes request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a Data Attribute resource. + # + # @overload get_data_attribute(request, options = nil) + # Pass arguments to `get_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_attribute(name: nil) + # Pass arguments to `get_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttribute] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new + # + # # Call the get_data_attribute method. + # result = client.get_data_attribute request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. + # p result + # + def get_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_attribute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.get_data_attribute request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataTaxonomyService REST API. + # + # This class represents the configuration for DataTaxonomyService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_taxonomy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_taxonomy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_taxonomy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the DataTaxonomyService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_taxonomy + ## + # RPC-specific configuration for `update_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_taxonomy + ## + # RPC-specific configuration for `delete_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_taxonomy + ## + # RPC-specific configuration for `list_data_taxonomies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_taxonomies + ## + # RPC-specific configuration for `get_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_taxonomy + ## + # RPC-specific configuration for `create_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_attribute_binding + ## + # RPC-specific configuration for `update_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_attribute_binding + ## + # RPC-specific configuration for `delete_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_attribute_binding + ## + # RPC-specific configuration for `list_data_attribute_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_attribute_bindings + ## + # RPC-specific configuration for `get_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_attribute_binding + ## + # RPC-specific configuration for `create_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_attribute + ## + # RPC-specific configuration for `update_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_attribute + ## + # RPC-specific configuration for `delete_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_attribute + ## + # RPC-specific configuration for `list_data_attributes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_attributes + ## + # RPC-specific configuration for `get_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_attribute + + # @private + def initialize parent_rpcs = nil + create_data_taxonomy_config = parent_rpcs.create_data_taxonomy if parent_rpcs.respond_to? :create_data_taxonomy + @create_data_taxonomy = ::Gapic::Config::Method.new create_data_taxonomy_config + update_data_taxonomy_config = parent_rpcs.update_data_taxonomy if parent_rpcs.respond_to? :update_data_taxonomy + @update_data_taxonomy = ::Gapic::Config::Method.new update_data_taxonomy_config + delete_data_taxonomy_config = parent_rpcs.delete_data_taxonomy if parent_rpcs.respond_to? :delete_data_taxonomy + @delete_data_taxonomy = ::Gapic::Config::Method.new delete_data_taxonomy_config + list_data_taxonomies_config = parent_rpcs.list_data_taxonomies if parent_rpcs.respond_to? :list_data_taxonomies + @list_data_taxonomies = ::Gapic::Config::Method.new list_data_taxonomies_config + get_data_taxonomy_config = parent_rpcs.get_data_taxonomy if parent_rpcs.respond_to? :get_data_taxonomy + @get_data_taxonomy = ::Gapic::Config::Method.new get_data_taxonomy_config + create_data_attribute_binding_config = parent_rpcs.create_data_attribute_binding if parent_rpcs.respond_to? :create_data_attribute_binding + @create_data_attribute_binding = ::Gapic::Config::Method.new create_data_attribute_binding_config + update_data_attribute_binding_config = parent_rpcs.update_data_attribute_binding if parent_rpcs.respond_to? :update_data_attribute_binding + @update_data_attribute_binding = ::Gapic::Config::Method.new update_data_attribute_binding_config + delete_data_attribute_binding_config = parent_rpcs.delete_data_attribute_binding if parent_rpcs.respond_to? :delete_data_attribute_binding + @delete_data_attribute_binding = ::Gapic::Config::Method.new delete_data_attribute_binding_config + list_data_attribute_bindings_config = parent_rpcs.list_data_attribute_bindings if parent_rpcs.respond_to? :list_data_attribute_bindings + @list_data_attribute_bindings = ::Gapic::Config::Method.new list_data_attribute_bindings_config + get_data_attribute_binding_config = parent_rpcs.get_data_attribute_binding if parent_rpcs.respond_to? :get_data_attribute_binding + @get_data_attribute_binding = ::Gapic::Config::Method.new get_data_attribute_binding_config + create_data_attribute_config = parent_rpcs.create_data_attribute if parent_rpcs.respond_to? :create_data_attribute + @create_data_attribute = ::Gapic::Config::Method.new create_data_attribute_config + update_data_attribute_config = parent_rpcs.update_data_attribute if parent_rpcs.respond_to? :update_data_attribute + @update_data_attribute = ::Gapic::Config::Method.new update_data_attribute_config + delete_data_attribute_config = parent_rpcs.delete_data_attribute if parent_rpcs.respond_to? :delete_data_attribute + @delete_data_attribute = ::Gapic::Config::Method.new delete_data_attribute_config + list_data_attributes_config = parent_rpcs.list_data_attributes if parent_rpcs.respond_to? :list_data_attributes + @list_data_attributes = ::Gapic::Config::Method.new list_data_attributes_config + get_data_attribute_config = parent_rpcs.get_data_attribute if parent_rpcs.respond_to? :get_data_attribute + @get_data_attribute = ::Gapic::Config::Method.new get_data_attribute_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb new file mode 100644 index 000000000000..e94682c4a3c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb @@ -0,0 +1,895 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataTaxonomyService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTaxonomyService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb new file mode 100644 index 000000000000..cf511be91af6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb @@ -0,0 +1,960 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/data_taxonomy_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + module Rest + ## + # REST service stub for the DataTaxonomyService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the create_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_data_taxonomy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_taxonomy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_data_taxonomy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_taxonomy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_data_taxonomy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_taxonomy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_data_taxonomies REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] + # A result object deserialized from the server's reply + def list_data_taxonomies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_taxonomies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # A result object deserialized from the server's reply + def get_data_taxonomy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_taxonomy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataTaxonomy.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_data_attribute_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_attribute_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_data_attribute_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_attribute_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_data_attribute_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_attribute_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_data_attribute_bindings REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] + # A result object deserialized from the server's reply + def list_data_attribute_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_attribute_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # A result object deserialized from the server's reply + def get_data_attribute_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_attribute_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_data_attribute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_attribute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_data_attribute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_attribute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_data_attribute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_attribute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_data_attributes REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] + # A result object deserialized from the server's reply + def list_data_attributes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_attributes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttribute] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # A result object deserialized from the server's reply + def get_data_attribute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_attribute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataAttribute.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_taxonomy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTaxonomies", + body: "data_taxonomy", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_taxonomy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_taxonomy.name}", + body: "data_taxonomy", + matches: [ + ["data_taxonomy.name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_taxonomy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_taxonomies REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_taxonomies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataTaxonomies", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_taxonomy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_attribute_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataAttributeBindings", + body: "data_attribute_binding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_attribute_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_attribute_binding.name}", + body: "data_attribute_binding", + matches: [ + ["data_attribute_binding.name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_attribute_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_attribute_bindings REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_attribute_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataAttributeBindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_attribute_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_attribute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/attributes", + body: "data_attribute", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_attribute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_attribute.name}", + body: "data_attribute", + matches: [ + ["data_attribute.name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_attribute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_attributes REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_attributes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/attributes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_attribute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb new file mode 100644 index 000000000000..ba8715a2a0bc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb @@ -0,0 +1,77 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/data_taxonomy.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# + +require 'grpc' +require 'google/cloud/dataplex/v1/data_taxonomy_pb' + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.DataTaxonomyService' + + # Create a DataTaxonomy resource. + rpc :CreateDataTaxonomy, ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Google::Longrunning::Operation + # Updates a DataTaxonomy resource. + rpc :UpdateDataTaxonomy, ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Google::Longrunning::Operation + # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy + # must be deleted before the DataTaxonomy can be deleted. + rpc :DeleteDataTaxonomy, ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Google::Longrunning::Operation + # Lists DataTaxonomy resources in a project and location. + rpc :ListDataTaxonomies, ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse + # Retrieves a DataTaxonomy resource. + rpc :GetDataTaxonomy, ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Google::Cloud::Dataplex::V1::DataTaxonomy + # Create a DataAttributeBinding resource. + rpc :CreateDataAttributeBinding, ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Google::Longrunning::Operation + # Updates a DataAttributeBinding resource. + rpc :UpdateDataAttributeBinding, ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Google::Longrunning::Operation + # Deletes a DataAttributeBinding resource. All attributes within the + # DataAttributeBinding must be deleted before the DataAttributeBinding can be + # deleted. + rpc :DeleteDataAttributeBinding, ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Google::Longrunning::Operation + # Lists DataAttributeBinding resources in a project and location. + rpc :ListDataAttributeBindings, ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse + # Retrieves a DataAttributeBinding resource. + rpc :GetDataAttributeBinding, ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Google::Cloud::Dataplex::V1::DataAttributeBinding + # Create a DataAttribute resource. + rpc :CreateDataAttribute, ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Google::Longrunning::Operation + # Updates a DataAttribute resource. + rpc :UpdateDataAttribute, ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Google::Longrunning::Operation + # Deletes a Data Attribute resource. + rpc :DeleteDataAttribute, ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Google::Longrunning::Operation + # Lists Data Attribute resources in a DataTaxonomy. + rpc :ListDataAttributes, ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse + # Retrieves a Data Attribute resource. + rpc :GetDataAttribute, ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Google::Cloud::Dataplex::V1::DataAttribute + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb new file mode 100644 index 000000000000..aefbd2740e2d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +require "google/cloud/dataplex/v1/dataplex_service/credentials" +require "google/cloud/dataplex/v1/dataplex_service/paths" +require "google/cloud/dataplex/v1/dataplex_service/operations" +require "google/cloud/dataplex/v1/dataplex_service/client" +require "google/cloud/dataplex/v1/dataplex_service/rest" + +module Google + module Cloud + module Dataplex + module 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. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/dataplex_service" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dataplex/v1/dataplex_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module DataplexService + end + end + end + end +end + +helper_path = ::File.join __dir__, "dataplex_service", "helpers.rb" +require "google/cloud/dataplex/v1/dataplex_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb new file mode 100644 index 000000000000..d761c77f09aa --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb @@ -0,0 +1,3950 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + ## + # Client for the DataplexService service. + # + # 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 Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dataplex_service_stub + + ## + # Configure the DataplexService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataplexService clients + # ::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_lake.timeout = 60.0 + + default_config.rpcs.update_lake.timeout = 60.0 + + default_config.rpcs.delete_lake.timeout = 60.0 + + default_config.rpcs.list_lakes.timeout = 60.0 + default_config.rpcs.list_lakes.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_lake.timeout = 60.0 + default_config.rpcs.get_lake.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_lake_actions.timeout = 60.0 + default_config.rpcs.list_lake_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_zone.timeout = 60.0 + + default_config.rpcs.update_zone.timeout = 60.0 + + default_config.rpcs.delete_zone.timeout = 60.0 + + default_config.rpcs.list_zones.timeout = 60.0 + default_config.rpcs.list_zones.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_zone.timeout = 60.0 + default_config.rpcs.get_zone.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_zone_actions.timeout = 60.0 + default_config.rpcs.list_zone_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_asset.timeout = 60.0 + + default_config.rpcs.update_asset.timeout = 60.0 + + default_config.rpcs.delete_asset.timeout = 60.0 + + default_config.rpcs.list_assets.timeout = 60.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_asset.timeout = 60.0 + default_config.rpcs.get_asset.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_asset_actions.timeout = 60.0 + default_config.rpcs.list_asset_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_task.timeout = 60.0 + + default_config.rpcs.update_task.timeout = 60.0 + + default_config.rpcs.delete_task.timeout = 60.0 + + default_config.rpcs.list_tasks.timeout = 60.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task.timeout = 60.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_jobs.timeout = 60.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_job.timeout = 60.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.cancel_job.timeout = 60.0 + + default_config.rpcs.create_environment.timeout = 60.0 + + default_config.rpcs.update_environment.timeout = 60.0 + + default_config.rpcs.delete_environment.timeout = 60.0 + + default_config.rpcs.list_environments.timeout = 60.0 + default_config.rpcs.list_environments.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_environment.timeout = 60.0 + default_config.rpcs.get_environment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataplexService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @dataplex_service_stub.universe_domain + end + + ## + # Create a new DataplexService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataplexService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @dataplex_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::DataplexService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataplex_service_stub.endpoint + config.universe_domain = @dataplex_service_stub.universe_domain + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataplex_service_stub.endpoint + config.universe_domain = @dataplex_service_stub.universe_domain + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataplexService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Creates a lake resource. + # + # @overload create_lake(request, options = nil) + # Pass arguments to `create_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil) + # Pass arguments to `create_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 lake_id [::String] + # 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 lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] + # Required. Lake resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new + # + # # Call the create_lake method. + # result = client.create_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_lake.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :create_lake, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a lake resource. + # + # @overload update_lake(request, options = nil) + # Pass arguments to `update_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_lake(update_mask: nil, lake: nil, validate_only: nil) + # Pass arguments to `update_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new + # + # # Call the update_lake method. + # result = client.update_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.lake&.name + header_params["lake.name"] = request.lake.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_lake.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :update_lake, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a lake resource. All zones within the lake must be deleted before + # the lake can be deleted. + # + # @overload delete_lake(request, options = nil) + # Pass arguments to `delete_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_lake(name: nil) + # Pass arguments to `delete_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new + # + # # Call the delete_lake method. + # result = client.delete_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_lake.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :delete_lake, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists lake resources in a project and location. + # + # @overload list_lakes(request, options = nil) + # Pass arguments to `list_lakes` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListLakesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_lakes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListLakesRequest.new + # + # # Call the list_lakes method. + # result = client.list_lakes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. + # p item + # end + # + def list_lakes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_lakes.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_lakes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_lakes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_lakes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lakes, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a lake resource. + # + # @overload get_lake(request, options = nil) + # Pass arguments to `get_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_lake(name: nil) + # Pass arguments to `get_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Lake] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Lake] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetLakeRequest.new + # + # # Call the get_lake method. + # result = client.get_lake request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Lake. + # p result + # + def get_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_lake.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_lake, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in a lake. + # + # @overload list_lake_actions(request, options = nil) + # Pass arguments to `list_lake_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListLakeActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_lake_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_lake_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new + # + # # Call the list_lake_actions method. + # result = client.list_lake_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_lake_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_lake_actions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_lake_actions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_lake_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_lake_actions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a zone resource within a lake. + # + # @overload create_zone(request, options = nil) + # Pass arguments to `create_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil) + # Pass arguments to `create_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param zone_id [::String] + # 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 zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] + # Required. Zone resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new + # + # # Call the create_zone method. + # result = client.create_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_zone.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :create_zone, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a zone resource. + # + # @overload update_zone(request, options = nil) + # Pass arguments to `update_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_zone(update_mask: nil, zone: nil, validate_only: nil) + # Pass arguments to `update_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new + # + # # Call the update_zone method. + # result = client.update_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.zone&.name + header_params["zone.name"] = request.zone.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_zone.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :update_zone, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a zone resource. All assets within a zone must be deleted before + # the zone can be deleted. + # + # @overload delete_zone(request, options = nil) + # Pass arguments to `delete_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_zone(name: nil) + # Pass arguments to `delete_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new + # + # # Call the delete_zone method. + # result = client.delete_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_zone.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :delete_zone, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists zone resources in a lake. + # + # @overload list_zones(request, options = nil) + # Pass arguments to `list_zones` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListZonesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_zones` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListZonesRequest.new + # + # # Call the list_zones method. + # result = client.list_zones request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. + # p item + # end + # + def list_zones request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZonesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_zones.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_zones.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_zones.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_zones, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zones, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a zone resource. + # + # @overload get_zone(request, options = nil) + # Pass arguments to `get_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_zone(name: nil) + # Pass arguments to `get_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Zone] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Zone] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetZoneRequest.new + # + # # Call the get_zone method. + # result = client.get_zone request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Zone. + # p result + # + def get_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_zone.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_zone, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in a zone. + # + # @overload list_zone_actions(request, options = nil) + # Pass arguments to `list_zone_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListZoneActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_zone_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_zone_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new + # + # # Call the list_zone_actions method. + # result = client.list_zone_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_zone_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_zone_actions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_zone_actions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_zone_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_zone_actions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an asset resource. + # + # @overload create_asset(request, options = nil) + # Pass arguments to `create_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil) + # Pass arguments to `create_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param asset_id [::String] + # 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 asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] + # Required. Asset resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new + # + # # Call the create_asset method. + # result = client.create_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :create_asset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an asset resource. + # + # @overload update_asset(request, options = nil) + # Pass arguments to `update_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_asset(update_mask: nil, asset: nil, validate_only: nil) + # Pass arguments to `update_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new + # + # # Call the update_asset method. + # result = client.update_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.asset&.name + header_params["asset.name"] = request.asset.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :update_asset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an asset resource. The referenced storage resource is detached + # (default) or deleted based on the associated Lifecycle policy. + # + # @overload delete_asset(request, options = nil) + # Pass arguments to `delete_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_asset(name: nil) + # Pass arguments to `delete_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new + # + # # Call the delete_asset method. + # result = client.delete_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :delete_asset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists asset resources in a zone. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_assets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_assets, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves an asset resource. + # + # @overload get_asset(request, options = nil) + # Pass arguments to `get_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_asset(name: nil) + # Pass arguments to `get_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Asset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Asset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetAssetRequest.new + # + # # Call the get_asset method. + # result = client.get_asset request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Asset. + # p result + # + def get_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_asset, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in an asset. + # + # @overload list_asset_actions(request, options = nil) + # Pass arguments to `list_asset_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAssetActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_asset_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_asset_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new + # + # # Call the list_asset_actions method. + # result = client.list_asset_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_asset_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_asset_actions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_asset_actions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_asset_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_asset_actions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a task resource within a lake. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_task(parent: nil, task_id: nil, task: nil, validate_only: nil) + # Pass arguments to `create_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param task_id [::String] + # Required. Task identifier. + # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] + # Required. Task resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :create_task, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the task resource. + # + # @overload update_task(request, options = nil) + # Pass arguments to `update_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_task(update_mask: nil, task: nil, validate_only: nil) + # Pass arguments to `update_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new + # + # # Call the update_task method. + # result = client.update_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.task&.name + header_params["task.name"] = request.task.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :update_task, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete the task resource. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_task(name: nil) + # Pass arguments to `delete_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new + # + # # Call the delete_task method. + # result = client.delete_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :delete_task, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists tasks under the given lake. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_tasks, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get task resource. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_task(name: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_task, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Jobs under the given task. + # + # @overload list_jobs(request, options = nil) + # Pass arguments to `list_jobs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_jobs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListJobsRequest.new + # + # # Call the list_jobs method. + # result = client.list_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Job. + # p item + # end + # + def list_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_jobs.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_jobs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_jobs, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Run an on demand execution of a Task. + # + # @overload run_task(request, options = nil) + # Pass arguments to `run_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::RunTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_task(name: nil, labels: nil, args: nil) + # Pass arguments to `run_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @param labels [::Hash{::String => ::String}] + # 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 args [::Hash{::String => ::String}] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::RunTaskRequest.new + # + # # Call the run_task method. + # result = client.run_task request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. + # p result + # + def run_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :run_task, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get job resource. + # + # @overload get_job(request, options = nil) + # Pass arguments to `get_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_job(name: nil) + # Pass arguments to `get_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Job] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Job] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetJobRequest.new + # + # # Call the get_job method. + # result = client.get_job request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Job. + # p result + # + def get_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_job.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_job, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancel jobs running for the task resource. + # + # @overload cancel_job(request, options = nil) + # Pass arguments to `cancel_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CancelJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_job(name: nil) + # Pass arguments to `cancel_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CancelJobRequest.new + # + # # Call the cancel_job method. + # result = client.cancel_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_job.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :cancel_job, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create an environment resource. + # + # @overload create_environment(request, options = nil) + # Pass arguments to `create_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_environment(parent: nil, environment_id: nil, environment: nil, validate_only: nil) + # Pass arguments to `create_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + # @param environment_id [::String] + # 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 environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] + # Required. Environment resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new + # + # # Call the create_environment method. + # result = client.create_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_environment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :create_environment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the environment resource. + # + # @overload update_environment(request, options = nil) + # Pass arguments to `update_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_environment(update_mask: nil, environment: nil, validate_only: nil) + # Pass arguments to `update_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new + # + # # Call the update_environment method. + # result = client.update_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.environment&.name + header_params["environment.name"] = request.environment.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_environment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :update_environment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete the environment resource. All the child resources must have been + # deleted before environment deletion can be initiated. + # + # @overload delete_environment(request, options = nil) + # Pass arguments to `delete_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_environment(name: nil) + # Pass arguments to `delete_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the environment: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new + # + # # Call the delete_environment method. + # result = client.delete_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_environment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :delete_environment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists environments under the given lake. + # + # @overload list_environments(request, options = nil) + # Pass arguments to `list_environments` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_environments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_environments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new + # + # # Call the list_environments method. + # result = client.list_environments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Environment. + # p item + # end + # + def list_environments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_environments.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_environments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_environments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_environments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_environments, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get environment resource. + # + # @overload get_environment(request, options = nil) + # Pass arguments to `get_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_environment(name: nil) + # Pass arguments to `get_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the environment: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Environment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Environment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new + # + # # Call the get_environment method. + # result = client.get_environment request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Environment. + # p result + # + def get_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_environment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_environment, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists session resources in an environment. + # + # @overload list_sessions(request, options = nil) + # Pass arguments to `list_sessions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListSessionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListSessionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_sessions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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 + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new + # + # # Call the list_sessions method. + # result = client.list_sessions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Session. + # p item + # end + # + def list_sessions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListSessionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_sessions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_sessions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sessions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_sessions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_sessions, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataplexService API. + # + # This class represents the configuration for DataplexService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_lake to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_lake.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_lake.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the DataplexService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :create_lake + ## + # RPC-specific configuration for `update_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :update_lake + ## + # RPC-specific configuration for `delete_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lake + ## + # RPC-specific configuration for `list_lakes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lakes + ## + # RPC-specific configuration for `get_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lake + ## + # RPC-specific configuration for `list_lake_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lake_actions + ## + # RPC-specific configuration for `create_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :create_zone + ## + # RPC-specific configuration for `update_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :update_zone + ## + # RPC-specific configuration for `delete_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_zone + ## + # RPC-specific configuration for `list_zones` + # @return [::Gapic::Config::Method] + # + attr_reader :list_zones + ## + # RPC-specific configuration for `get_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :get_zone + ## + # RPC-specific configuration for `list_zone_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_zone_actions + ## + # RPC-specific configuration for `create_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_asset + ## + # RPC-specific configuration for `update_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_asset + ## + # RPC-specific configuration for `delete_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_asset + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `get_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_asset + ## + # RPC-specific configuration for `list_asset_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_asset_actions + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `update_task` + # @return [::Gapic::Config::Method] + # + attr_reader :update_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `list_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_jobs + ## + # RPC-specific configuration for `run_task` + # @return [::Gapic::Config::Method] + # + attr_reader :run_task + ## + # RPC-specific configuration for `get_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job + ## + # RPC-specific configuration for `cancel_job` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_job + ## + # RPC-specific configuration for `create_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_environment + ## + # RPC-specific configuration for `update_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_environment + ## + # RPC-specific configuration for `delete_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_environment + ## + # RPC-specific configuration for `list_environments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_environments + ## + # RPC-specific configuration for `get_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_environment + ## + # RPC-specific configuration for `list_sessions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sessions + + # @private + def initialize parent_rpcs = nil + create_lake_config = parent_rpcs.create_lake if parent_rpcs.respond_to? :create_lake + @create_lake = ::Gapic::Config::Method.new create_lake_config + update_lake_config = parent_rpcs.update_lake if parent_rpcs.respond_to? :update_lake + @update_lake = ::Gapic::Config::Method.new update_lake_config + delete_lake_config = parent_rpcs.delete_lake if parent_rpcs.respond_to? :delete_lake + @delete_lake = ::Gapic::Config::Method.new delete_lake_config + list_lakes_config = parent_rpcs.list_lakes if parent_rpcs.respond_to? :list_lakes + @list_lakes = ::Gapic::Config::Method.new list_lakes_config + get_lake_config = parent_rpcs.get_lake if parent_rpcs.respond_to? :get_lake + @get_lake = ::Gapic::Config::Method.new get_lake_config + list_lake_actions_config = parent_rpcs.list_lake_actions if parent_rpcs.respond_to? :list_lake_actions + @list_lake_actions = ::Gapic::Config::Method.new list_lake_actions_config + create_zone_config = parent_rpcs.create_zone if parent_rpcs.respond_to? :create_zone + @create_zone = ::Gapic::Config::Method.new create_zone_config + update_zone_config = parent_rpcs.update_zone if parent_rpcs.respond_to? :update_zone + @update_zone = ::Gapic::Config::Method.new update_zone_config + delete_zone_config = parent_rpcs.delete_zone if parent_rpcs.respond_to? :delete_zone + @delete_zone = ::Gapic::Config::Method.new delete_zone_config + list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones + @list_zones = ::Gapic::Config::Method.new list_zones_config + get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone + @get_zone = ::Gapic::Config::Method.new get_zone_config + list_zone_actions_config = parent_rpcs.list_zone_actions if parent_rpcs.respond_to? :list_zone_actions + @list_zone_actions = ::Gapic::Config::Method.new list_zone_actions_config + create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset + @create_asset = ::Gapic::Config::Method.new create_asset_config + update_asset_config = parent_rpcs.update_asset if parent_rpcs.respond_to? :update_asset + @update_asset = ::Gapic::Config::Method.new update_asset_config + delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset + @delete_asset = ::Gapic::Config::Method.new delete_asset_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset + @get_asset = ::Gapic::Config::Method.new get_asset_config + list_asset_actions_config = parent_rpcs.list_asset_actions if parent_rpcs.respond_to? :list_asset_actions + @list_asset_actions = ::Gapic::Config::Method.new list_asset_actions_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task + @update_task = ::Gapic::Config::Method.new update_task_config + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task + @delete_task = ::Gapic::Config::Method.new delete_task_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs + @list_jobs = ::Gapic::Config::Method.new list_jobs_config + run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task + @run_task = ::Gapic::Config::Method.new run_task_config + get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job + @get_job = ::Gapic::Config::Method.new get_job_config + cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job + @cancel_job = ::Gapic::Config::Method.new cancel_job_config + create_environment_config = parent_rpcs.create_environment if parent_rpcs.respond_to? :create_environment + @create_environment = ::Gapic::Config::Method.new create_environment_config + update_environment_config = parent_rpcs.update_environment if parent_rpcs.respond_to? :update_environment + @update_environment = ::Gapic::Config::Method.new update_environment_config + delete_environment_config = parent_rpcs.delete_environment if parent_rpcs.respond_to? :delete_environment + @delete_environment = ::Gapic::Config::Method.new delete_environment_config + list_environments_config = parent_rpcs.list_environments if parent_rpcs.respond_to? :list_environments + @list_environments = ::Gapic::Config::Method.new list_environments_config + get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment + @get_environment = ::Gapic::Config::Method.new get_environment_config + list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions + @list_sessions = ::Gapic::Config::Method.new list_sessions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb new file mode 100644 index 000000000000..ca24868d1300 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + # Credentials for the DataplexService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb new file mode 100644 index 000000000000..e9203215706a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb @@ -0,0 +1,801 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataplexService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataplexService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb new file mode 100644 index 000000000000..bf8d60dd39e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb @@ -0,0 +1,178 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + # Path helper methods for the DataplexService API. + module Paths + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # @param asset [String] + # + # @return [::String] + def asset_path project:, location:, lake:, zone:, asset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/assets/#{asset}" + end + + ## + # Create a fully-qualified Environment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param environment [String] + # + # @return [::String] + def environment_path project:, location:, lake:, environment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/environments/#{environment}" + end + + ## + # Create a fully-qualified Job resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param task [String] + # @param job [String] + # + # @return [::String] + def job_path project:, location:, lake:, task:, job: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "task cannot contain /" if task.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/tasks/#{task}/jobs/#{job}" + end + + ## + # Create a fully-qualified Lake resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # + # @return [::String] + def lake_path project:, location:, lake: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Task resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param task [String] + # + # @return [::String] + def task_path project:, location:, lake:, task: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/tasks/#{task}" + end + + ## + # Create a fully-qualified Zone resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # + # @return [::String] + def zone_path project:, location:, lake:, zone: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb new file mode 100644 index 000000000000..76c9f9aa9a0d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/dataplex_service/credentials" +require "google/cloud/dataplex/v1/dataplex_service/paths" +require "google/cloud/dataplex/v1/dataplex_service/rest/operations" +require "google/cloud/dataplex/v1/dataplex_service/rest/client" + +module Google + module Cloud + module Dataplex + module 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. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/dataplex_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module DataplexService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/dataplex_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb new file mode 100644 index 000000000000..6c8e3c4c6d88 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb @@ -0,0 +1,3700 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/service_pb" +require "google/cloud/dataplex/v1/dataplex_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + module Rest + ## + # REST client for the DataplexService service. + # + # 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 Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dataplex_service_stub + + ## + # Configure the DataplexService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataplexService clients + # ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_lake.timeout = 60.0 + + default_config.rpcs.update_lake.timeout = 60.0 + + default_config.rpcs.delete_lake.timeout = 60.0 + + default_config.rpcs.list_lakes.timeout = 60.0 + default_config.rpcs.list_lakes.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_lake.timeout = 60.0 + default_config.rpcs.get_lake.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_lake_actions.timeout = 60.0 + default_config.rpcs.list_lake_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_zone.timeout = 60.0 + + default_config.rpcs.update_zone.timeout = 60.0 + + default_config.rpcs.delete_zone.timeout = 60.0 + + default_config.rpcs.list_zones.timeout = 60.0 + default_config.rpcs.list_zones.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_zone.timeout = 60.0 + default_config.rpcs.get_zone.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_zone_actions.timeout = 60.0 + default_config.rpcs.list_zone_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_asset.timeout = 60.0 + + default_config.rpcs.update_asset.timeout = 60.0 + + default_config.rpcs.delete_asset.timeout = 60.0 + + default_config.rpcs.list_assets.timeout = 60.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_asset.timeout = 60.0 + default_config.rpcs.get_asset.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_asset_actions.timeout = 60.0 + default_config.rpcs.list_asset_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_task.timeout = 60.0 + + default_config.rpcs.update_task.timeout = 60.0 + + default_config.rpcs.delete_task.timeout = 60.0 + + default_config.rpcs.list_tasks.timeout = 60.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task.timeout = 60.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_jobs.timeout = 60.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_job.timeout = 60.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.cancel_job.timeout = 60.0 + + default_config.rpcs.create_environment.timeout = 60.0 + + default_config.rpcs.update_environment.timeout = 60.0 + + default_config.rpcs.delete_environment.timeout = 60.0 + + default_config.rpcs.list_environments.timeout = 60.0 + default_config.rpcs.list_environments.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_environment.timeout = 60.0 + default_config.rpcs.get_environment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataplexService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @dataplex_service_stub.universe_domain + end + + ## + # Create a new DataplexService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataplexService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @dataplex_service_stub = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataplex_service_stub.endpoint + config.universe_domain = @dataplex_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataplex_service_stub.endpoint + config.universe_domain = @dataplex_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataplexService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Creates a lake resource. + # + # @overload create_lake(request, options = nil) + # Pass arguments to `create_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil) + # Pass arguments to `create_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 lake_id [::String] + # 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 lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] + # Required. Lake resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new + # + # # Call the create_lake method. + # result = client.create_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_lake.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.create_lake request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a lake resource. + # + # @overload update_lake(request, options = nil) + # Pass arguments to `update_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_lake(update_mask: nil, lake: nil, validate_only: nil) + # Pass arguments to `update_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new + # + # # Call the update_lake method. + # result = client.update_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_lake.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.update_lake request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a lake resource. All zones within the lake must be deleted before + # the lake can be deleted. + # + # @overload delete_lake(request, options = nil) + # Pass arguments to `delete_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_lake(name: nil) + # Pass arguments to `delete_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new + # + # # Call the delete_lake method. + # result = client.delete_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_lake.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.delete_lake request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists lake resources in a project and location. + # + # @overload list_lakes(request, options = nil) + # Pass arguments to `list_lakes` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListLakesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_lakes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListLakesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListLakesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListLakesRequest.new + # + # # Call the list_lakes method. + # result = client.list_lakes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. + # p item + # end + # + def list_lakes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_lakes.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_lakes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_lakes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_lakes request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a lake resource. + # + # @overload get_lake(request, options = nil) + # Pass arguments to `get_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_lake(name: nil) + # Pass arguments to `get_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Lake] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Lake] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetLakeRequest.new + # + # # Call the get_lake method. + # result = client.get_lake request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Lake. + # p result + # + def get_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_lake.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_lake request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in a lake. + # + # @overload list_lake_actions(request, options = nil) + # Pass arguments to `list_lake_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListLakeActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_lake_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_lake_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new + # + # # Call the list_lake_actions method. + # result = client.list_lake_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_lake_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_lake_actions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_lake_actions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_lake_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_lake_actions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, "actions", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a zone resource within a lake. + # + # @overload create_zone(request, options = nil) + # Pass arguments to `create_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil) + # Pass arguments to `create_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param zone_id [::String] + # 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 zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] + # Required. Zone resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new + # + # # Call the create_zone method. + # result = client.create_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_zone.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.create_zone request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a zone resource. + # + # @overload update_zone(request, options = nil) + # Pass arguments to `update_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_zone(update_mask: nil, zone: nil, validate_only: nil) + # Pass arguments to `update_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new + # + # # Call the update_zone method. + # result = client.update_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_zone.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.update_zone request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a zone resource. All assets within a zone must be deleted before + # the zone can be deleted. + # + # @overload delete_zone(request, options = nil) + # Pass arguments to `delete_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_zone(name: nil) + # Pass arguments to `delete_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new + # + # # Call the delete_zone method. + # result = client.delete_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_zone.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.delete_zone request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists zone resources in a lake. + # + # @overload list_zones(request, options = nil) + # Pass arguments to `list_zones` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListZonesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_zones` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListZonesRequest.new + # + # # Call the list_zones method. + # result = client.list_zones request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. + # p item + # end + # + def list_zones request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZonesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_zones.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_zones.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_zones.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_zones request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zones, "zones", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a zone resource. + # + # @overload get_zone(request, options = nil) + # Pass arguments to `get_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_zone(name: nil) + # Pass arguments to `get_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Zone] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Zone] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetZoneRequest.new + # + # # Call the get_zone method. + # result = client.get_zone request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Zone. + # p result + # + def get_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_zone.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_zone request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in a zone. + # + # @overload list_zone_actions(request, options = nil) + # Pass arguments to `list_zone_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListZoneActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_zone_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_zone_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new + # + # # Call the list_zone_actions method. + # result = client.list_zone_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_zone_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_zone_actions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_zone_actions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_zone_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_zone_actions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, "actions", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an asset resource. + # + # @overload create_asset(request, options = nil) + # Pass arguments to `create_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil) + # Pass arguments to `create_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param asset_id [::String] + # 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 asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] + # Required. Asset resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new + # + # # Call the create_asset method. + # result = client.create_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.create_asset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an asset resource. + # + # @overload update_asset(request, options = nil) + # Pass arguments to `update_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_asset(update_mask: nil, asset: nil, validate_only: nil) + # Pass arguments to `update_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new + # + # # Call the update_asset method. + # result = client.update_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.update_asset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an asset resource. The referenced storage resource is detached + # (default) or deleted based on the associated Lifecycle policy. + # + # @overload delete_asset(request, options = nil) + # Pass arguments to `delete_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_asset(name: nil) + # Pass arguments to `delete_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new + # + # # Call the delete_asset method. + # result = client.delete_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.delete_asset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists asset resources in a zone. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_assets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_assets, "assets", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves an asset resource. + # + # @overload get_asset(request, options = nil) + # Pass arguments to `get_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_asset(name: nil) + # Pass arguments to `get_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Asset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Asset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetAssetRequest.new + # + # # Call the get_asset method. + # result = client.get_asset request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Asset. + # p result + # + def get_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_asset request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in an asset. + # + # @overload list_asset_actions(request, options = nil) + # Pass arguments to `list_asset_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAssetActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_asset_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_asset_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new + # + # # Call the list_asset_actions method. + # result = client.list_asset_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_asset_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_asset_actions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_asset_actions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_asset_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_asset_actions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, "actions", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a task resource within a lake. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_task(parent: nil, task_id: nil, task: nil, validate_only: nil) + # Pass arguments to `create_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param task_id [::String] + # Required. Task identifier. + # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] + # Required. Task resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.create_task request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the task resource. + # + # @overload update_task(request, options = nil) + # Pass arguments to `update_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_task(update_mask: nil, task: nil, validate_only: nil) + # Pass arguments to `update_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new + # + # # Call the update_task method. + # result = client.update_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.update_task request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete the task resource. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_task(name: nil) + # Pass arguments to `delete_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new + # + # # Call the delete_task method. + # result = client.delete_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.delete_task request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists tasks under the given lake. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListTasksResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_tasks request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get task resource. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_task(name: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_task request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Jobs under the given task. + # + # @overload list_jobs(request, options = nil) + # Pass arguments to `list_jobs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_jobs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListJobsRequest.new + # + # # Call the list_jobs method. + # result = client.list_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Job. + # p item + # end + # + def list_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_jobs.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_jobs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_jobs, "jobs", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Run an on demand execution of a Task. + # + # @overload run_task(request, options = nil) + # Pass arguments to `run_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::RunTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_task(name: nil, labels: nil, args: nil) + # Pass arguments to `run_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @param labels [::Hash{::String => ::String}] + # 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 args [::Hash{::String => ::String}] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::RunTaskRequest.new + # + # # Call the run_task method. + # result = client.run_task request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. + # p result + # + def run_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.run_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.run_task request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get job resource. + # + # @overload get_job(request, options = nil) + # Pass arguments to `get_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_job(name: nil) + # Pass arguments to `get_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Job] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetJobRequest.new + # + # # Call the get_job method. + # result = client.get_job request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Job. + # p result + # + def get_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_job.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_job request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancel jobs running for the task resource. + # + # @overload cancel_job(request, options = nil) + # Pass arguments to `cancel_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CancelJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_job(name: nil) + # Pass arguments to `cancel_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CancelJobRequest.new + # + # # Call the cancel_job method. + # result = client.cancel_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_job.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.cancel_job request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create an environment resource. + # + # @overload create_environment(request, options = nil) + # Pass arguments to `create_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_environment(parent: nil, environment_id: nil, environment: nil, validate_only: nil) + # Pass arguments to `create_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + # @param environment_id [::String] + # 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 environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] + # Required. Environment resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new + # + # # Call the create_environment method. + # result = client.create_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_environment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.create_environment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the environment resource. + # + # @overload update_environment(request, options = nil) + # Pass arguments to `update_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_environment(update_mask: nil, environment: nil, validate_only: nil) + # Pass arguments to `update_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new + # + # # Call the update_environment method. + # result = client.update_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_environment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.update_environment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete the environment resource. All the child resources must have been + # deleted before environment deletion can be initiated. + # + # @overload delete_environment(request, options = nil) + # Pass arguments to `delete_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_environment(name: nil) + # Pass arguments to `delete_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the environment: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new + # + # # Call the delete_environment method. + # result = client.delete_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_environment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.delete_environment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists environments under the given lake. + # + # @overload list_environments(request, options = nil) + # Pass arguments to `list_environments` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_environments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_environments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new + # + # # Call the list_environments method. + # result = client.list_environments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Environment. + # p item + # end + # + def list_environments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_environments.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_environments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_environments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_environments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_environments, "environments", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get environment resource. + # + # @overload get_environment(request, options = nil) + # Pass arguments to `get_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_environment(name: nil) + # Pass arguments to `get_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the environment: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Environment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Environment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new + # + # # Call the get_environment method. + # result = client.get_environment request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Environment. + # p result + # + def get_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_environment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_environment request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists session resources in an environment. + # + # @overload list_sessions(request, options = nil) + # Pass arguments to `list_sessions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListSessionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListSessionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_sessions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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 + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new + # + # # Call the list_sessions method. + # result = client.list_sessions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Session. + # p item + # end + # + def list_sessions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListSessionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_sessions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_sessions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sessions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_sessions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_sessions, "sessions", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataplexService REST API. + # + # This class represents the configuration for DataplexService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_lake to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_lake.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_lake.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the DataplexService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :create_lake + ## + # RPC-specific configuration for `update_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :update_lake + ## + # RPC-specific configuration for `delete_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lake + ## + # RPC-specific configuration for `list_lakes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lakes + ## + # RPC-specific configuration for `get_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lake + ## + # RPC-specific configuration for `list_lake_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lake_actions + ## + # RPC-specific configuration for `create_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :create_zone + ## + # RPC-specific configuration for `update_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :update_zone + ## + # RPC-specific configuration for `delete_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_zone + ## + # RPC-specific configuration for `list_zones` + # @return [::Gapic::Config::Method] + # + attr_reader :list_zones + ## + # RPC-specific configuration for `get_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :get_zone + ## + # RPC-specific configuration for `list_zone_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_zone_actions + ## + # RPC-specific configuration for `create_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_asset + ## + # RPC-specific configuration for `update_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_asset + ## + # RPC-specific configuration for `delete_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_asset + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `get_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_asset + ## + # RPC-specific configuration for `list_asset_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_asset_actions + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `update_task` + # @return [::Gapic::Config::Method] + # + attr_reader :update_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `list_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_jobs + ## + # RPC-specific configuration for `run_task` + # @return [::Gapic::Config::Method] + # + attr_reader :run_task + ## + # RPC-specific configuration for `get_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job + ## + # RPC-specific configuration for `cancel_job` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_job + ## + # RPC-specific configuration for `create_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_environment + ## + # RPC-specific configuration for `update_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_environment + ## + # RPC-specific configuration for `delete_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_environment + ## + # RPC-specific configuration for `list_environments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_environments + ## + # RPC-specific configuration for `get_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_environment + ## + # RPC-specific configuration for `list_sessions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sessions + + # @private + def initialize parent_rpcs = nil + create_lake_config = parent_rpcs.create_lake if parent_rpcs.respond_to? :create_lake + @create_lake = ::Gapic::Config::Method.new create_lake_config + update_lake_config = parent_rpcs.update_lake if parent_rpcs.respond_to? :update_lake + @update_lake = ::Gapic::Config::Method.new update_lake_config + delete_lake_config = parent_rpcs.delete_lake if parent_rpcs.respond_to? :delete_lake + @delete_lake = ::Gapic::Config::Method.new delete_lake_config + list_lakes_config = parent_rpcs.list_lakes if parent_rpcs.respond_to? :list_lakes + @list_lakes = ::Gapic::Config::Method.new list_lakes_config + get_lake_config = parent_rpcs.get_lake if parent_rpcs.respond_to? :get_lake + @get_lake = ::Gapic::Config::Method.new get_lake_config + list_lake_actions_config = parent_rpcs.list_lake_actions if parent_rpcs.respond_to? :list_lake_actions + @list_lake_actions = ::Gapic::Config::Method.new list_lake_actions_config + create_zone_config = parent_rpcs.create_zone if parent_rpcs.respond_to? :create_zone + @create_zone = ::Gapic::Config::Method.new create_zone_config + update_zone_config = parent_rpcs.update_zone if parent_rpcs.respond_to? :update_zone + @update_zone = ::Gapic::Config::Method.new update_zone_config + delete_zone_config = parent_rpcs.delete_zone if parent_rpcs.respond_to? :delete_zone + @delete_zone = ::Gapic::Config::Method.new delete_zone_config + list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones + @list_zones = ::Gapic::Config::Method.new list_zones_config + get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone + @get_zone = ::Gapic::Config::Method.new get_zone_config + list_zone_actions_config = parent_rpcs.list_zone_actions if parent_rpcs.respond_to? :list_zone_actions + @list_zone_actions = ::Gapic::Config::Method.new list_zone_actions_config + create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset + @create_asset = ::Gapic::Config::Method.new create_asset_config + update_asset_config = parent_rpcs.update_asset if parent_rpcs.respond_to? :update_asset + @update_asset = ::Gapic::Config::Method.new update_asset_config + delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset + @delete_asset = ::Gapic::Config::Method.new delete_asset_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset + @get_asset = ::Gapic::Config::Method.new get_asset_config + list_asset_actions_config = parent_rpcs.list_asset_actions if parent_rpcs.respond_to? :list_asset_actions + @list_asset_actions = ::Gapic::Config::Method.new list_asset_actions_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task + @update_task = ::Gapic::Config::Method.new update_task_config + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task + @delete_task = ::Gapic::Config::Method.new delete_task_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs + @list_jobs = ::Gapic::Config::Method.new list_jobs_config + run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task + @run_task = ::Gapic::Config::Method.new run_task_config + get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job + @get_job = ::Gapic::Config::Method.new get_job_config + cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job + @cancel_job = ::Gapic::Config::Method.new cancel_job_config + create_environment_config = parent_rpcs.create_environment if parent_rpcs.respond_to? :create_environment + @create_environment = ::Gapic::Config::Method.new create_environment_config + update_environment_config = parent_rpcs.update_environment if parent_rpcs.respond_to? :update_environment + @update_environment = ::Gapic::Config::Method.new update_environment_config + delete_environment_config = parent_rpcs.delete_environment if parent_rpcs.respond_to? :delete_environment + @delete_environment = ::Gapic::Config::Method.new delete_environment_config + list_environments_config = parent_rpcs.list_environments if parent_rpcs.respond_to? :list_environments + @list_environments = ::Gapic::Config::Method.new list_environments_config + get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment + @get_environment = ::Gapic::Config::Method.new get_environment_config + list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions + @list_sessions = ::Gapic::Config::Method.new list_sessions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb new file mode 100644 index 000000000000..0dec2450e6f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb @@ -0,0 +1,895 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataplexService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataplexService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb new file mode 100644 index 000000000000..8a828884a451 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb @@ -0,0 +1,2028 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/service_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + module Rest + ## + # REST service stub for the DataplexService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the create_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateLakeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_lake request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_lake_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateLakeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_lake request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_lake_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteLakeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_lake request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_lake_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_lakes REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListLakesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListLakesResponse] + # A result object deserialized from the server's reply + def list_lakes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_lakes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListLakesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetLakeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Lake] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Lake] + # A result object deserialized from the server's reply + def get_lake request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lake_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Lake.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_lake_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # A result object deserialized from the server's reply + def list_lake_actions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_lake_actions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateZoneRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_zone request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_zone_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateZoneRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_zone request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_zone_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteZoneRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_zone request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_zone_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_zones REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListZonesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListZonesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListZonesResponse] + # A result object deserialized from the server's reply + def list_zones request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_zones_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListZonesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetZoneRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Zone] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Zone] + # A result object deserialized from the server's reply + def get_zone request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_zone_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Zone.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_zone_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # A result object deserialized from the server's reply + def list_zone_actions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_zone_actions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_assets REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListAssetsResponse] + # A result object deserialized from the server's reply + def list_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Asset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Asset] + # A result object deserialized from the server's reply + def get_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Asset.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_asset_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # A result object deserialized from the server's reply + def list_asset_actions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_asset_actions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_tasks REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListTasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListTasksResponse] + # A result object deserialized from the server's reply + def list_tasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Task] + # A result object deserialized from the server's reply + def get_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Task.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_jobs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListJobsResponse] + # A result object deserialized from the server's reply + def list_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the run_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::RunTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # A result object deserialized from the server's reply + def run_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::RunTaskResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Job] + # A result object deserialized from the server's reply + def get_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Job.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the cancel_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CancelJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_environment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_environment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_environment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_environment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_environment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_environment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_environments REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse] + # A result object deserialized from the server's reply + def list_environments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_environments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Environment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Environment] + # A result object deserialized from the server's reply + def get_environment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_environment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Environment.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_sessions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListSessionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListSessionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListSessionsResponse] + # A result object deserialized from the server's reply + def list_sessions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sessions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListSessionsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the create_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateLakeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_lake_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/lakes", + body: "lake", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateLakeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_lake_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{lake.name}", + body: "lake", + matches: [ + ["lake.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteLakeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_lake_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_lakes REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_lakes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/lakes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetLakeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_lake_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_lake_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_lake_actions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/actions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateZoneRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_zone_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/zones", + body: "zone", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateZoneRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_zone_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{zone.name}", + body: "zone", + matches: [ + ["zone.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteZoneRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_zone_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_zones REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListZonesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_zones_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/zones", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetZoneRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_zone_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_zone_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_zone_actions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/actions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/assets", + body: "asset", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{asset.name}", + body: "asset", + matches: [ + ["asset.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_assets REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/assets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_asset_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_asset_actions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/actions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/tasks", + body: "task", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{task.name}", + body: "task", + matches: [ + ["task.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tasks REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListTasksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/tasks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_jobs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListJobsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/jobs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::RunTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:run", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CancelJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_environment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/environments", + body: "environment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_environment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{environment.name}", + body: "environment", + matches: [ + ["environment.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_environment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_environments REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_environments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/environments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_environment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sessions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListSessionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_sessions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/sessions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb new file mode 100644 index 000000000000..36b7d41e7d77 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/datascans.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/data_profile_pb' +require 'google/cloud/dataplex/v1/data_quality_pb' +require 'google/cloud/dataplex/v1/processing_pb' +require 'google/cloud/dataplex/v1/resources_pb' +require 'google/cloud/dataplex/v1/service_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n(google/cloud/dataplex/v1/datascans.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/dataplex/v1/data_profile.proto\x1a+google/cloud/dataplex/v1/data_quality.proto\x1a)google/cloud/dataplex/v1/processing.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc5\x01\n\x15\x43reateDataScanRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\tdata_scan\x18\x02 \x01(\x0b\x32\".google.cloud.dataplex.v1.DataScanB\x03\xe0\x41\x02\x12\x19\n\x0c\x64\x61ta_scan_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa5\x01\n\x15UpdateDataScanRequest\x12:\n\tdata_scan\x18\x01 \x01(\x0b\x32\".google.cloud.dataplex.v1.DataScanB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x15\x44\x65leteDataScanRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\"\xdf\x01\n\x12GetDataScanRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\x12L\n\x04view\x18\x02 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.GetDataScanRequest.DataScanViewB\x03\xe0\x41\x01\"C\n\x0c\x44\x61taScanView\x12\x1e\n\x1a\x44\x41TA_SCAN_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\n\"\xae\x01\n\x14ListDataScansRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"}\n\x15ListDataScansResponse\x12\x36\n\ndata_scans\x18\x01 \x03(\x0b\x32\".google.cloud.dataplex.v1.DataScan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"L\n\x12RunDataScanRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\"I\n\x13RunDataScanResponse\x12\x32\n\x03job\x18\x01 \x01(\x0b\x32%.google.cloud.dataplex.v1.DataScanJob\"\xf2\x01\n\x15GetDataScanJobRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/DataScanJob\x12R\n\x04view\x18\x02 \x01(\x0e\x32?.google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobViewB\x03\xe0\x41\x01\"J\n\x0f\x44\x61taScanJobView\x12\"\n\x1e\x44\x41TA_SCAN_JOB_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\n\"\x99\x01\n\x17ListDataScanJobsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"r\n\x18ListDataScanJobsResponse\x12=\n\x0e\x64\x61ta_scan_jobs\x18\x01 \x03(\x0b\x32%.google.cloud.dataplex.v1.DataScanJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"4\n\x1fGenerateDataQualityRulesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"[\n GenerateDataQualityRulesResponse\x12\x37\n\x04rule\x18\x01 \x03(\x0b\x32).google.cloud.dataplex.v1.DataQualityRule\"\xb1\n\n\x08\x44\x61taScan\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x06labels\x18\x05 \x03(\x0b\x32..google.cloud.dataplex.v1.DataScan.LabelsEntryB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x06 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x04\x64\x61ta\x18\t \x01(\x0b\x32$.google.cloud.dataplex.v1.DataSourceB\x03\xe0\x41\x02\x12M\n\x0e\x65xecution_spec\x18\n \x01(\x0b\x32\x30.google.cloud.dataplex.v1.DataScan.ExecutionSpecB\x03\xe0\x41\x01\x12Q\n\x10\x65xecution_status\x18\x0b \x01(\x0b\x32\x32.google.cloud.dataplex.v1.DataScan.ExecutionStatusB\x03\xe0\x41\x03\x12\x39\n\x04type\x18\x0c \x01(\x0e\x32&.google.cloud.dataplex.v1.DataScanTypeB\x03\xe0\x41\x03\x12\x46\n\x11\x64\x61ta_quality_spec\x18\x64 \x01(\x0b\x32).google.cloud.dataplex.v1.DataQualitySpecH\x00\x12\x46\n\x11\x64\x61ta_profile_spec\x18\x65 \x01(\x0b\x32).google.cloud.dataplex.v1.DataProfileSpecH\x00\x12P\n\x13\x64\x61ta_quality_result\x18\xc8\x01 \x01(\x0b\x32+.google.cloud.dataplex.v1.DataQualityResultB\x03\xe0\x41\x03H\x01\x12P\n\x13\x64\x61ta_profile_result\x18\xc9\x01 \x01(\x0b\x32+.google.cloud.dataplex.v1.DataProfileResultB\x03\xe0\x41\x03H\x01\x1am\n\rExecutionSpec\x12\x37\n\x07trigger\x18\x01 \x01(\x0b\x32!.google.cloud.dataplex.v1.TriggerB\x03\xe0\x41\x01\x12\x14\n\x05\x66ield\x18\x64 \x01(\tB\x03\xe0\x41\x05H\x00\x42\r\n\x0bincremental\x1a\x85\x01\n\x0f\x45xecutionStatus\x12\x39\n\x15latest_job_start_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13latest_job_end_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:c\xea\x41`\n dataplex.googleapis.com/DataScan\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/dataScans\x12\xaf\x01\n\x0bRunDataScan\x12,.google.cloud.dataplex.v1.RunDataScanRequest\x1a-.google.cloud.dataplex.v1.RunDataScanResponse\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/dataScans/*}:run:\x01*\x12\xad\x01\n\x0eGetDataScanJob\x12/.google.cloud.dataplex.v1.GetDataScanJobRequest\x1a%.google.cloud.dataplex.v1.DataScanJob\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}\x12\xc0\x01\n\x10ListDataScanJobs\x12\x31.google.cloud.dataplex.v1.ListDataScanJobsRequest\x1a\x32.google.cloud.dataplex.v1.ListDataScanJobsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*/dataScans/*}/jobs\x12\xc1\x02\n\x18GenerateDataQualityRules\x12\x39.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest\x1a:.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse\"\xad\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x9f\x01\"F/v1/{name=projects/*/locations/*/dataScans/*}:generateDataQualityRules:\x01*ZR\"M/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}:generateDataQualityRules:\x01*\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBj\n\x1c\x63om.google.cloud.dataplex.v1B\x0e\x44\x61taScansProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.cloud.dataplex.v1.DataQualityRule", "google/cloud/dataplex/v1/data_quality.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.dataplex.v1.DataSource", "google/cloud/dataplex/v1/processing.proto"], + ["google.cloud.dataplex.v1.DataProfileSpec", "google/cloud/dataplex/v1/data_profile.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + CreateDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataScanRequest").msgclass + UpdateDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataScanRequest").msgclass + DeleteDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataScanRequest").msgclass + GetDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanRequest").msgclass + GetDataScanRequest::DataScanView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanRequest.DataScanView").enummodule + ListDataScansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScansRequest").msgclass + ListDataScansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScansResponse").msgclass + RunDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunDataScanRequest").msgclass + RunDataScanResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunDataScanResponse").msgclass + GetDataScanJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanJobRequest").msgclass + GetDataScanJobRequest::DataScanJobView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView").enummodule + ListDataScanJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScanJobsRequest").msgclass + ListDataScanJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScanJobsResponse").msgclass + GenerateDataQualityRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GenerateDataQualityRulesRequest").msgclass + GenerateDataQualityRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GenerateDataQualityRulesResponse").msgclass + DataScan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan").msgclass + DataScan::ExecutionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan.ExecutionSpec").msgclass + DataScan::ExecutionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan.ExecutionStatus").msgclass + DataScanJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanJob").msgclass + DataScanJob::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanJob.State").enummodule + DataScanType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb new file mode 100644 index 000000000000..bba1ee3c3dee --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb @@ -0,0 +1,63 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/datascans.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# + +require 'grpc' +require 'google/cloud/dataplex/v1/datascans_pb' + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + # 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 Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.DataScanService' + + # Creates a DataScan resource. + rpc :CreateDataScan, ::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Google::Longrunning::Operation + # Updates a DataScan resource. + rpc :UpdateDataScan, ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Google::Longrunning::Operation + # Deletes a DataScan resource. + rpc :DeleteDataScan, ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Google::Longrunning::Operation + # Gets a DataScan resource. + rpc :GetDataScan, ::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Google::Cloud::Dataplex::V1::DataScan + # Lists DataScans. + rpc :ListDataScans, ::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Google::Cloud::Dataplex::V1::ListDataScansResponse + # Runs an on-demand execution of a DataScan + rpc :RunDataScan, ::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Google::Cloud::Dataplex::V1::RunDataScanResponse + # Gets a DataScanJob resource. + rpc :GetDataScanJob, ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Google::Cloud::Dataplex::V1::DataScanJob + # Lists DataScanJobs under the given DataScan. + rpc :ListDataScanJobs, ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse + # Generates recommended DataQualityRule from a data profiling DataScan. + rpc :GenerateDataQualityRules, ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb new file mode 100644 index 000000000000..358f748a0eaa --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/logs.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n#google/cloud/dataplex/v1/logs.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\t\n\x0e\x44iscoveryEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07lake_id\x18\x02 \x01(\t\x12\x0f\n\x07zone_id\x18\x03 \x01(\t\x12\x10\n\x08\x61sset_id\x18\x04 \x01(\t\x12\x15\n\rdata_location\x18\x05 \x01(\t\x12@\n\x04type\x18\n \x01(\x0e\x32\x32.google.cloud.dataplex.v1.DiscoveryEvent.EventType\x12H\n\x06\x63onfig\x18\x14 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetailsH\x00\x12H\n\x06\x65ntity\x18\x15 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetailsH\x00\x12N\n\tpartition\x18\x16 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetailsH\x00\x12H\n\x06\x61\x63tion\x18\x17 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetailsH\x00\x1a\x9e\x01\n\rConfigDetails\x12Z\n\nparameters\x18\x01 \x03(\x0b\x32\x46.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.ParametersEntry\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x62\n\rEntityDetails\x12\x0e\n\x06\x65ntity\x18\x01 \x01(\t\x12\x41\n\x04type\x18\x02 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.DiscoveryEvent.EntityType\x1a\x98\x01\n\x10PartitionDetails\x12\x11\n\tpartition\x18\x01 \x01(\t\x12\x0e\n\x06\x65ntity\x18\x02 \x01(\t\x12\x41\n\x04type\x18\x03 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.DiscoveryEvent.EntityType\x12\x1e\n\x16sampled_data_locations\x18\x04 \x03(\t\x1a\x1d\n\rActionDetails\x12\x0c\n\x04type\x18\x01 \x01(\t\"\xb4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43ONFIG\x10\x01\x12\x12\n\x0e\x45NTITY_CREATED\x10\x02\x12\x12\n\x0e\x45NTITY_UPDATED\x10\x03\x12\x12\n\x0e\x45NTITY_DELETED\x10\x04\x12\x15\n\x11PARTITION_CREATED\x10\x05\x12\x15\n\x11PARTITION_UPDATED\x10\x06\x12\x15\n\x11PARTITION_DELETED\x10\x07\"A\n\nEntityType\x12\x1b\n\x17\x45NTITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02\x42\t\n\x07\x64\x65tails\"\xc5\x05\n\x08JobEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x05state\x18\x05 \x01(\x0e\x32(.google.cloud.dataplex.v1.JobEvent.State\x12\x0f\n\x07retries\x18\x06 \x01(\x05\x12\x35\n\x04type\x18\x07 \x01(\x0e\x32\'.google.cloud.dataplex.v1.JobEvent.Type\x12;\n\x07service\x18\x08 \x01(\x0e\x32*.google.cloud.dataplex.v1.JobEvent.Service\x12\x13\n\x0bservice_job\x18\t \x01(\t\x12N\n\x11\x65xecution_trigger\x18\x0b \x01(\x0e\x32\x33.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SPARK\x10\x01\x12\x0c\n\x08NOTEBOOK\x10\x02\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\x0b\n\x07\x41\x42ORTED\x10\x04\"0\n\x07Service\x12\x17\n\x13SERVICE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TAPROC\x10\x01\"W\n\x10\x45xecutionTrigger\x12!\n\x1d\x45XECUTION_TRIGGER_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTASK_CONFIG\x10\x01\x12\x0f\n\x0bRUN_REQUEST\x10\x02\"\xbd\x05\n\x0cSessionEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07user_id\x18\x02 \x01(\t\x12\x12\n\nsession_id\x18\x03 \x01(\t\x12>\n\x04type\x18\x04 \x01(\x0e\x32\x30.google.cloud.dataplex.v1.SessionEvent.EventType\x12\x43\n\x05query\x18\x05 \x01(\x0b\x32\x32.google.cloud.dataplex.v1.SessionEvent.QueryDetailH\x00\x12\x17\n\x0f\x65vent_succeeded\x18\x06 \x01(\x08\x12\x1c\n\x14\x66\x61st_startup_enabled\x18\x07 \x01(\x08\x12\x36\n\x13unassigned_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\xa3\x02\n\x0bQueryDetail\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12\x12\n\nquery_text\x18\x02 \x01(\t\x12I\n\x06\x65ngine\x18\x03 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine\x12+\n\x08\x64uration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x19\n\x11result_size_bytes\x18\x05 \x01(\x03\x12\x1c\n\x14\x64\x61ta_processed_bytes\x18\x06 \x01(\x03\"=\n\x06\x45ngine\x12\x16\n\x12\x45NGINE_UNSPECIFIED\x10\x00\x12\r\n\tSPARK_SQL\x10\x01\x12\x0c\n\x08\x42IGQUERY\x10\x02\"S\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05START\x10\x01\x12\x08\n\x04STOP\x10\x02\x12\t\n\x05QUERY\x10\x03\x12\n\n\x06\x43REATE\x10\x04\x42\x08\n\x06\x64\x65tail\"\xba\x07\n\x0fGovernanceEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12G\n\nevent_type\x18\x02 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.GovernanceEvent.EventType\x12\x45\n\x06\x65ntity\x18\x03 \x01(\x0b\x32\x30.google.cloud.dataplex.v1.GovernanceEvent.EntityH\x00\x88\x01\x01\x1a\xd2\x01\n\x06\x45ntity\x12\x33\n\x06\x65ntity\x18\x01 \x01(\tB#\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12P\n\x0b\x65ntity_type\x18\x02 \x01(\x0e\x32;.google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType\"A\n\nEntityType\x12\x1b\n\x17\x45NTITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02\"\xa5\x04\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aRESOURCE_IAM_POLICY_UPDATE\x10\x01\x12\x19\n\x15\x42IGQUERY_TABLE_CREATE\x10\x02\x12\x19\n\x15\x42IGQUERY_TABLE_UPDATE\x10\x03\x12\x19\n\x15\x42IGQUERY_TABLE_DELETE\x10\x04\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_CREATE\x10\x05\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_UPDATE\x10\x06\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_DELETE\x10\x07\x12\x1c\n\x18\x42IGQUERY_TAXONOMY_CREATE\x10\n\x12\x1e\n\x1a\x42IGQUERY_POLICY_TAG_CREATE\x10\x0b\x12\x1e\n\x1a\x42IGQUERY_POLICY_TAG_DELETE\x10\x0c\x12&\n\"BIGQUERY_POLICY_TAG_SET_IAM_POLICY\x10\r\x12\x18\n\x14\x41\x43\x43\x45SS_POLICY_UPDATE\x10\x0e\x12%\n!GOVERNANCE_RULE_MATCHED_RESOURCES\x10\x0f\x12(\n$GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS\x10\x10\x12\x1a\n\x16GOVERNANCE_RULE_ERRORS\x10\x11\x12\x1e\n\x1aGOVERNANCE_RULE_PROCESSING\x10\x12\x42\t\n\x07_entity\"\xf3\x12\n\rDataScanEvent\x12\x13\n\x0b\x64\x61ta_source\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x04type\x18\x05 \x01(\x0e\x32\x30.google.cloud.dataplex.v1.DataScanEvent.ScanType\x12<\n\x05state\x18\x06 \x01(\x0e\x32-.google.cloud.dataplex.v1.DataScanEvent.State\x12\x0f\n\x07message\x18\x07 \x01(\t\x12\x14\n\x0cspec_version\x18\x08 \x01(\t\x12@\n\x07trigger\x18\t \x01(\x0e\x32/.google.cloud.dataplex.v1.DataScanEvent.Trigger\x12<\n\x05scope\x18\n \x01(\x0e\x32-.google.cloud.dataplex.v1.DataScanEvent.Scope\x12Q\n\x0c\x64\x61ta_profile\x18\x65 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultH\x00\x12Q\n\x0c\x64\x61ta_quality\x18\x66 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultH\x00\x12\x62\n\x14\x64\x61ta_profile_configs\x18\xc9\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigsH\x01\x12\x62\n\x14\x64\x61ta_quality_configs\x18\xca\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigsH\x01\x12_\n\x18post_scan_actions_result\x18\x0b \x01(\x0b\x32=.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult\x1a&\n\x11\x44\x61taProfileResult\x12\x11\n\trow_count\x18\x01 \x01(\x03\x1a\x9c\x04\n\x11\x44\x61taQualityResult\x12\x11\n\trow_count\x18\x01 \x01(\x03\x12\x0e\n\x06passed\x18\x02 \x01(\x08\x12h\n\x10\x64imension_passed\x18\x03 \x03(\x0b\x32N.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.DimensionPassedEntry\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x66\n\x0f\x64imension_score\x18\x05 \x03(\x0b\x32M.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.DimensionScoreEntry\x12`\n\x0c\x63olumn_score\x18\x06 \x03(\x0b\x32J.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.ColumnScoreEntry\x1a\x36\n\x14\x44imensionPassedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\x35\n\x13\x44imensionScoreEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1a\x32\n\x10\x43olumnScoreEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1ap\n\x19\x44\x61taProfileAppliedConfigs\x12\x18\n\x10sampling_percent\x18\x01 \x01(\x02\x12\x1a\n\x12row_filter_applied\x18\x02 \x01(\x08\x12\x1d\n\x15\x63olumn_filter_applied\x18\x03 \x01(\x08\x1aQ\n\x19\x44\x61taQualityAppliedConfigs\x12\x18\n\x10sampling_percent\x18\x01 \x01(\x02\x12\x1a\n\x12row_filter_applied\x18\x02 \x01(\x08\x1a\xe6\x02\n\x15PostScanActionsResult\x12r\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32R.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult\x1a\xd8\x01\n\x14\x42igQueryExportResult\x12g\n\x05state\x18\x01 \x01(\x0e\x32X.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State\x12\x0f\n\x07message\x18\x02 \x01(\t\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\"I\n\x08ScanType\x12\x19\n\x15SCAN_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_PROFILE\x10\x01\x12\x10\n\x0c\x44\x41TA_QUALITY\x10\x02\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x12\x0b\n\x07\x43REATED\x10\x05\"?\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\x0c\n\x08SCHEDULE\x10\x02\"9\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\x0f\n\x0bINCREMENTAL\x10\x02\x42\x08\n\x06resultB\x10\n\x0e\x61ppliedConfigs\"\x99\x07\n\x19\x44\x61taQualityScanRuleResult\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x61ta_source\x18\x02 \x01(\t\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\t\x12\x11\n\trule_name\x18\x04 \x01(\t\x12O\n\trule_type\x18\x05 \x01(\x0e\x32<.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType\x12Z\n\x0e\x65valution_type\x18\x06 \x01(\x0e\x32\x42.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType\x12\x16\n\x0erule_dimension\x18\x07 \x01(\t\x12\x19\n\x11threshold_percent\x18\x08 \x01(\x01\x12J\n\x06result\x18\t \x01(\x0e\x32:.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result\x12\x1b\n\x13\x65valuated_row_count\x18\n \x01(\x03\x12\x18\n\x10passed_row_count\x18\x0b \x01(\x03\x12\x16\n\x0enull_row_count\x18\x0c \x01(\x03\x12\x1b\n\x13\x61ssertion_row_count\x18\r \x01(\x03\"\x92\x02\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14NON_NULL_EXPECTATION\x10\x01\x12\x15\n\x11RANGE_EXPECTATION\x10\x02\x12\x15\n\x11REGEX_EXPECTATION\x10\x03\x12\x1d\n\x19ROW_CONDITION_EXPECTATION\x10\x04\x12\x13\n\x0fSET_EXPECTATION\x10\x05\x12\x1f\n\x1bSTATISTIC_RANGE_EXPECTATION\x10\x06\x12\x1f\n\x1bTABLE_CONDITION_EXPECTATION\x10\x07\x12\x1a\n\x16UNIQUENESS_EXPECTATION\x10\x08\x12\x11\n\rSQL_ASSERTION\x10\t\"M\n\x0e\x45valuationType\x12\x1f\n\x1b\x45VALUATION_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PER_ROW\x10\x01\x12\r\n\tAGGREGATE\x10\x02\"8\n\x06Result\x12\x16\n\x12RESULT_UNSPECIFIED\x10\x00\x12\n\n\x06PASSED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x42\x65\n\x1c\x63om.google.cloud.dataplex.v1B\tLogsProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + DiscoveryEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent").msgclass + DiscoveryEvent::ConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails").msgclass + DiscoveryEvent::EntityDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails").msgclass + DiscoveryEvent::PartitionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails").msgclass + DiscoveryEvent::ActionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails").msgclass + DiscoveryEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EventType").enummodule + DiscoveryEvent::EntityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EntityType").enummodule + JobEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent").msgclass + JobEvent::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.Type").enummodule + JobEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.State").enummodule + JobEvent::Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.Service").enummodule + JobEvent::ExecutionTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.ExecutionTrigger").enummodule + SessionEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent").msgclass + SessionEvent::QueryDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.QueryDetail").msgclass + SessionEvent::QueryDetail::Engine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine").enummodule + SessionEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.EventType").enummodule + GovernanceEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent").msgclass + GovernanceEvent::Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.Entity").msgclass + GovernanceEvent::Entity::EntityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType").enummodule + GovernanceEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.EventType").enummodule + DataScanEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent").msgclass + DataScanEvent::DataProfileResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataProfileResult").msgclass + DataScanEvent::DataQualityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataQualityResult").msgclass + DataScanEvent::DataProfileAppliedConfigs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs").msgclass + DataScanEvent::DataQualityAppliedConfigs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs").msgclass + DataScanEvent::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult").msgclass + DataScanEvent::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult").msgclass + DataScanEvent::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State").enummodule + DataScanEvent::ScanType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.ScanType").enummodule + DataScanEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.State").enummodule + DataScanEvent::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.Trigger").enummodule + DataScanEvent::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.Scope").enummodule + DataQualityScanRuleResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult").msgclass + DataQualityScanRuleResult::RuleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType").enummodule + DataQualityScanRuleResult::EvaluationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType").enummodule + DataQualityScanRuleResult::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.Result").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb new file mode 100644 index 000000000000..9f92bf741053 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/metadata.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\'google/cloud/dataplex/v1/metadata.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9e\x01\n\x13\x43reateEntityRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x35\n\x06\x65ntity\x18\x03 \x01(\x0b\x32 .google.cloud.dataplex.v1.EntityB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"h\n\x13UpdateEntityRequest\x12\x35\n\x06\x65ntity\x18\x02 \x01(\x0b\x32 .google.cloud.dataplex.v1.EntityB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"^\n\x13\x44\x65leteEntityRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xa3\x02\n\x13ListEntitiesRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12K\n\x04view\x18\x02 \x01(\x0e\x32\x38.google.cloud.dataplex.v1.ListEntitiesRequest.EntityViewB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"C\n\nEntityView\x12\x1b\n\x17\x45NTITY_VIEW_UNSPECIFIED\x10\x00\x12\n\n\x06TABLES\x10\x01\x12\x0c\n\x08\x46ILESETS\x10\x02\"c\n\x14ListEntitiesResponse\x12\x32\n\x08\x65ntities\x18\x01 \x03(\x0b\x32 .google.cloud.dataplex.v1.Entity\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xde\x01\n\x10GetEntityRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12H\n\x04view\x18\x02 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.GetEntityRequest.EntityViewB\x03\xe0\x41\x01\"J\n\nEntityView\x12\x1b\n\x17\x45NTITY_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\n\n\x06SCHEMA\x10\x02\x12\x08\n\x04\x46ULL\x10\x04\"\x95\x01\n\x15ListPartitionsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa9\x01\n\x16\x43reatePartitionRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12;\n\tpartition\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.PartitionB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x16\x44\x65letePartitionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/Partition\x12\x13\n\x04\x65tag\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x01\"j\n\x16ListPartitionsResponse\x12\x37\n\npartitions\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.Partition\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x13GetPartitionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/Partition\"\xc9\t\n\x06\x45ntity\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12;\n\x04type\x18\n \x01(\x0e\x32%.google.cloud.dataplex.v1.Entity.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x15\n\x05\x61sset\x18\x0b \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x19\n\tdata_path\x18\x0c \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1e\n\x11\x64\x61ta_path_pattern\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rcatalog_entry\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12?\n\x06system\x18\x0f \x01(\x0e\x32\'.google.cloud.dataplex.v1.StorageSystemB\x06\xe0\x41\x02\xe0\x41\x05\x12<\n\x06\x66ormat\x18\x10 \x01(\x0b\x32\'.google.cloud.dataplex.v1.StorageFormatB\x03\xe0\x41\x02\x12P\n\rcompatibility\x18\x13 \x01(\x0b\x32\x34.google.cloud.dataplex.v1.Entity.CompatibilityStatusB\x03\xe0\x41\x03\x12<\n\x06\x61\x63\x63\x65ss\x18\x15 \x01(\x0b\x32\'.google.cloud.dataplex.v1.StorageAccessB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12\x35\n\x06schema\x18\x32 \x01(\x0b\x32 .google.cloud.dataplex.v1.SchemaB\x03\xe0\x41\x02\x1a\x90\x02\n\x13\x43ompatibilityStatus\x12_\n\x0ehive_metastore\x18\x01 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.Entity.CompatibilityStatus.CompatibilityB\x03\xe0\x41\x03\x12Y\n\x08\x62igquery\x18\x02 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.Entity.CompatibilityStatus.CompatibilityB\x03\xe0\x41\x03\x1a=\n\rCompatibility\x12\x17\n\ncompatible\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x03\"4\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02:x\xea\x41u\n\x1e\x64\x61taplex.googleapis.com/Entity\x12Sprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}\"\xa1\x02\n\tPartition\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!dataplex.googleapis.com/Partition\x12\x16\n\x06values\x18\x02 \x03(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x08location\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x13\n\x04\x65tag\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x01:\x93\x01\xea\x41\x8f\x01\n!dataplex.googleapis.com/Partition\x12jprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}\"\xb7\x07\n\x06Schema\x12\x19\n\x0cuser_managed\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x41\n\x06\x66ields\x18\x02 \x03(\x0b\x32,.google.cloud.dataplex.v1.Schema.SchemaFieldB\x03\xe0\x41\x01\x12N\n\x10partition_fields\x18\x03 \x03(\x0b\x32/.google.cloud.dataplex.v1.Schema.PartitionFieldB\x03\xe0\x41\x01\x12M\n\x0fpartition_style\x18\x04 \x01(\x0e\x32/.google.cloud.dataplex.v1.Schema.PartitionStyleB\x03\xe0\x41\x01\x1a\xf1\x01\n\x0bSchemaField\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\x04type\x18\x03 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.TypeB\x03\xe0\x41\x02\x12\x38\n\x04mode\x18\x04 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.ModeB\x03\xe0\x41\x02\x12\x41\n\x06\x66ields\x18\n \x03(\x0b\x32,.google.cloud.dataplex.v1.Schema.SchemaFieldB\x03\xe0\x41\x01\x1a`\n\x0ePartitionField\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\x04type\x18\x02 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.TypeB\x06\xe0\x41\x02\xe0\x41\x05\"\xc9\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x42OOLEAN\x10\x01\x12\x08\n\x04\x42YTE\x10\x02\x12\t\n\x05INT16\x10\x03\x12\t\n\x05INT32\x10\x04\x12\t\n\x05INT64\x10\x05\x12\t\n\x05\x46LOAT\x10\x06\x12\n\n\x06\x44OUBLE\x10\x07\x12\x0b\n\x07\x44\x45\x43IMAL\x10\x08\x12\n\n\x06STRING\x10\t\x12\n\n\x06\x42INARY\x10\n\x12\r\n\tTIMESTAMP\x10\x0b\x12\x08\n\x04\x44\x41TE\x10\x0c\x12\x08\n\x04TIME\x10\r\x12\n\n\x06RECORD\x10\x0e\x12\x08\n\x04NULL\x10\x64\"F\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08REQUIRED\x10\x01\x12\x0c\n\x08NULLABLE\x10\x02\x12\x0c\n\x08REPEATED\x10\x03\"F\n\x0ePartitionStyle\x12\x1f\n\x1bPARTITION_STYLE_UNSPECIFIED\x10\x00\x12\x13\n\x0fHIVE_COMPATIBLE\x10\x01\"\xf4\x06\n\rStorageFormat\x12\x43\n\x06\x66ormat\x18\x01 \x01(\x0e\x32..google.cloud.dataplex.v1.StorageFormat.FormatB\x03\xe0\x41\x03\x12Z\n\x12\x63ompression_format\x18\x02 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.StorageFormat.CompressionFormatB\x03\xe0\x41\x01\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x03\x63sv\x18\n \x01(\x0b\x32\x32.google.cloud.dataplex.v1.StorageFormat.CsvOptionsB\x03\xe0\x41\x01H\x00\x12H\n\x04json\x18\x0b \x01(\x0b\x32\x33.google.cloud.dataplex.v1.StorageFormat.JsonOptionsB\x03\xe0\x41\x01H\x00\x12N\n\x07iceberg\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.StorageFormat.IcebergOptionsB\x03\xe0\x41\x01H\x00\x1ai\n\nCsvOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bheader_rows\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05quote\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x30\n\x0eIcebergOptions\x12\x1e\n\x11metadata_location\x18\x01 \x01(\tB\x03\xe0\x41\x01\"\xab\x01\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x0b\n\x07PARQUET\x10\x01\x12\x08\n\x04\x41VRO\x10\x02\x12\x07\n\x03ORC\x10\x03\x12\x07\n\x03\x43SV\x10\x64\x12\x08\n\x04JSON\x10\x65\x12\n\n\x05IMAGE\x10\xc8\x01\x12\n\n\x05\x41UDIO\x10\xc9\x01\x12\n\n\x05VIDEO\x10\xca\x01\x12\t\n\x04TEXT\x10\xcb\x01\x12\r\n\x08TFRECORD\x10\xcc\x01\x12\n\n\x05OTHER\x10\xe8\x07\x12\x0c\n\x07UNKNOWN\x10\xe9\x07\"L\n\x11\x43ompressionFormat\x12\"\n\x1e\x43OMPRESSION_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04GZIP\x10\x02\x12\t\n\x05\x42ZIP2\x10\x03\x42\t\n\x07options\"\x9a\x01\n\rStorageAccess\x12\x45\n\x04read\x18\x15 \x01(\x0e\x32\x32.google.cloud.dataplex.v1.StorageAccess.AccessModeB\x03\xe0\x41\x03\"B\n\nAccessMode\x12\x1b\n\x17\x41\x43\x43\x45SS_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44IRECT\x10\x01\x12\x0b\n\x07MANAGED\x10\x02*P\n\rStorageSystem\x12\x1e\n\x1aSTORAGE_SYSTEM_UNSPECIFIED\x10\x00\x12\x11\n\rCLOUD_STORAGE\x10\x01\x12\x0c\n\x08\x42IGQUERY\x10\x02\x32\x89\x0e\n\x0fMetadataService\x12\xbd\x01\n\x0c\x43reateEntity\x12-.google.cloud.dataplex.v1.CreateEntityRequest\x1a .google.cloud.dataplex.v1.Entity\"\\\xda\x41\rparent,entity\x82\xd3\xe4\x93\x02\x46\"*\x12\x12 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a metadata entity. Only supports full resource update. + # + # @overload update_entity(request, options = nil) + # Pass arguments to `update_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_entity(entity: nil, validate_only: nil) + # Pass arguments to `update_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] + # Required. Update description. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new + # + # # Call the update_entity method. + # result = client.update_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def update_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_entity.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.entity&.name + header_params["entity.name"] = request.entity.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_entity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :update_entity, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a metadata entity. + # + # @overload delete_entity(request, options = nil) + # Pass arguments to `delete_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_entity(name: nil, etag: nil) + # Pass arguments to `delete_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param etag [::String] + # Required. The etag associated with the entity, which can be retrieved with + # a [GetEntity][] request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new + # + # # Call the delete_entity method. + # result = client.delete_entity request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_entity.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_entity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :delete_entity, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a metadata entity. + # + # @overload get_entity(request, options = nil) + # Pass arguments to `get_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_entity(name: nil, view: nil) + # Pass arguments to `get_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + # @param view [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] + # Optional. Used to select the subset of entity information to return. + # Defaults to `BASIC`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntityRequest.new + # + # # Call the get_entity method. + # result = client.get_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def get_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_entity.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_entity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :get_entity, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List metadata entities in a zone. + # + # @overload list_entities(request, options = nil) + # Pass arguments to `list_entities` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntitiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_entities` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param view [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] + # Required. Specify the entity view to make a partial list request. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new + # + # # Call the list_entities method. + # result = client.list_entities request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. + # p item + # end + # + def list_entities request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntitiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_entities.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_entities.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_entities.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :list_entities, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @metadata_service_stub, :list_entities, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a metadata partition. + # + # @overload create_partition(request, options = nil) + # Pass arguments to `create_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreatePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_partition(parent: nil, partition: nil, validate_only: nil) + # Pass arguments to `create_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param partition [::Google::Cloud::Dataplex::V1::Partition, ::Hash] + # Required. Partition resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new + # + # # Call the create_partition method. + # result = client.create_partition request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + # p result + # + def create_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreatePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_partition.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_partition.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :create_partition, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a metadata partition. + # + # @overload delete_partition(request, options = nil) + # Pass arguments to `delete_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeletePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_partition(name: nil, etag: nil) + # Pass arguments to `delete_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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 etag [::String] + # Optional. The etag associated with the partition. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new + # + # # Call the delete_partition method. + # result = client.delete_partition request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeletePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_partition.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_partition.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :delete_partition, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a metadata partition of an entity. + # + # @overload get_partition(request, options = nil) + # Pass arguments to `get_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetPartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_partition(name: nil) + # Pass arguments to `get_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new + # + # # Call the get_partition method. + # result = client.get_partition request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + # p result + # + def get_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetPartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_partition.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_partition.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :get_partition, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List metadata partitions of an entity. + # + # @overload list_partitions(request, options = nil) + # Pass arguments to `list_partitions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListPartitionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_partitions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new + # + # # Call the list_partitions method. + # result = client.list_partitions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. + # p item + # end + # + def list_partitions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListPartitionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_partitions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_partitions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_partitions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :list_partitions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @metadata_service_stub, :list_partitions, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the MetadataService API. + # + # This class represents the configuration for MetadataService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::MetadataService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_entity to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::MetadataService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_entity.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_entity.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the MetadataService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entity + ## + # RPC-specific configuration for `update_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entity + ## + # RPC-specific configuration for `delete_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entity + ## + # RPC-specific configuration for `get_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entity + ## + # RPC-specific configuration for `list_entities` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entities + ## + # RPC-specific configuration for `create_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :create_partition + ## + # RPC-specific configuration for `delete_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_partition + ## + # RPC-specific configuration for `get_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :get_partition + ## + # RPC-specific configuration for `list_partitions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_partitions + + # @private + def initialize parent_rpcs = nil + create_entity_config = parent_rpcs.create_entity if parent_rpcs.respond_to? :create_entity + @create_entity = ::Gapic::Config::Method.new create_entity_config + update_entity_config = parent_rpcs.update_entity if parent_rpcs.respond_to? :update_entity + @update_entity = ::Gapic::Config::Method.new update_entity_config + delete_entity_config = parent_rpcs.delete_entity if parent_rpcs.respond_to? :delete_entity + @delete_entity = ::Gapic::Config::Method.new delete_entity_config + get_entity_config = parent_rpcs.get_entity if parent_rpcs.respond_to? :get_entity + @get_entity = ::Gapic::Config::Method.new get_entity_config + list_entities_config = parent_rpcs.list_entities if parent_rpcs.respond_to? :list_entities + @list_entities = ::Gapic::Config::Method.new list_entities_config + create_partition_config = parent_rpcs.create_partition if parent_rpcs.respond_to? :create_partition + @create_partition = ::Gapic::Config::Method.new create_partition_config + delete_partition_config = parent_rpcs.delete_partition if parent_rpcs.respond_to? :delete_partition + @delete_partition = ::Gapic::Config::Method.new delete_partition_config + get_partition_config = parent_rpcs.get_partition if parent_rpcs.respond_to? :get_partition + @get_partition = ::Gapic::Config::Method.new get_partition_config + list_partitions_config = parent_rpcs.list_partitions if parent_rpcs.respond_to? :list_partitions + @list_partitions = ::Gapic::Config::Method.new list_partitions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb new file mode 100644 index 000000000000..ebb897d11c17 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module MetadataService + # Credentials for the MetadataService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb new file mode 100644 index 000000000000..f17baadf07d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb @@ -0,0 +1,102 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + module MetadataService + # Path helper methods for the MetadataService API. + module Paths + ## + # Create a fully-qualified Entity resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # @param entity [String] + # + # @return [::String] + def entity_path project:, location:, lake:, zone:, entity: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}" + end + + ## + # Create a fully-qualified Partition resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # @param entity [String] + # @param partition [String] + # + # @return [::String] + def partition_path project:, location:, lake:, zone:, entity:, partition: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + raise ::ArgumentError, "entity cannot contain /" if entity.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}/partitions/#{partition}" + end + + ## + # Create a fully-qualified Zone resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # + # @return [::String] + def zone_path project:, location:, lake:, zone: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb new file mode 100644 index 000000000000..27a710ff906d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/metadata_service/credentials" +require "google/cloud/dataplex/v1/metadata_service/paths" +require "google/cloud/dataplex/v1/metadata_service/rest/client" + +module Google + module Cloud + module Dataplex + module V1 + ## + # Metadata service manages metadata resources such as tables, filesets and + # partitions. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/metadata_service/rest" + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + module MetadataService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/metadata_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb new file mode 100644 index 000000000000..ae31aa2694a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb @@ -0,0 +1,1233 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/metadata_pb" +require "google/cloud/dataplex/v1/metadata_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module MetadataService + module Rest + ## + # REST client for the MetadataService service. + # + # Metadata service manages metadata resources such as tables, filesets and + # partitions. + # + class Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :metadata_service_stub + + ## + # Configure the MetadataService Client class. + # + # See {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all MetadataService clients + # ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_entity.timeout = 60.0 + + default_config.rpcs.update_entity.timeout = 60.0 + + default_config.rpcs.delete_entity.timeout = 60.0 + + default_config.rpcs.get_entity.timeout = 60.0 + default_config.rpcs.get_entity.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_entities.timeout = 60.0 + default_config.rpcs.list_entities.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_partition.timeout = 60.0 + + default_config.rpcs.delete_partition.timeout = 60.0 + + default_config.rpcs.get_partition.timeout = 60.0 + default_config.rpcs.get_partition.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_partitions.timeout = 60.0 + default_config.rpcs.list_partitions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the MetadataService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @metadata_service_stub.universe_domain + end + + ## + # Create a new MetadataService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the MetadataService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @metadata_service_stub = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @metadata_service_stub.endpoint + config.universe_domain = @metadata_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @metadata_service_stub.endpoint + config.universe_domain = @metadata_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Create a metadata entity. + # + # @overload create_entity(request, options = nil) + # Pass arguments to `create_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_entity(parent: nil, entity: nil, validate_only: nil) + # Pass arguments to `create_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] + # Required. Entity resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntityRequest.new + # + # # Call the create_entity method. + # result = client.create_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def create_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_entity.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_entity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.create_entity request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a metadata entity. Only supports full resource update. + # + # @overload update_entity(request, options = nil) + # Pass arguments to `update_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_entity(entity: nil, validate_only: nil) + # Pass arguments to `update_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] + # Required. Update description. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new + # + # # Call the update_entity method. + # result = client.update_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def update_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_entity.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_entity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.update_entity request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a metadata entity. + # + # @overload delete_entity(request, options = nil) + # Pass arguments to `delete_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_entity(name: nil, etag: nil) + # Pass arguments to `delete_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param etag [::String] + # Required. The etag associated with the entity, which can be retrieved with + # a [GetEntity][] request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new + # + # # Call the delete_entity method. + # result = client.delete_entity request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_entity.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_entity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.delete_entity request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a metadata entity. + # + # @overload get_entity(request, options = nil) + # Pass arguments to `get_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_entity(name: nil, view: nil) + # Pass arguments to `get_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + # @param view [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] + # Optional. Used to select the subset of entity information to return. + # Defaults to `BASIC`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntityRequest.new + # + # # Call the get_entity method. + # result = client.get_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def get_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_entity.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_entity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.get_entity request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List metadata entities in a zone. + # + # @overload list_entities(request, options = nil) + # Pass arguments to `list_entities` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntitiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_entities` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param view [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] + # Required. Specify the entity view to make a partial list request. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new + # + # # Call the list_entities method. + # result = client.list_entities request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. + # p item + # end + # + def list_entities request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntitiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_entities.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_entities.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_entities.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.list_entities request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_entities, "entities", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a metadata partition. + # + # @overload create_partition(request, options = nil) + # Pass arguments to `create_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreatePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_partition(parent: nil, partition: nil, validate_only: nil) + # Pass arguments to `create_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param partition [::Google::Cloud::Dataplex::V1::Partition, ::Hash] + # Required. Partition resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new + # + # # Call the create_partition method. + # result = client.create_partition request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + # p result + # + def create_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreatePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_partition.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_partition.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.create_partition request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a metadata partition. + # + # @overload delete_partition(request, options = nil) + # Pass arguments to `delete_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeletePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_partition(name: nil, etag: nil) + # Pass arguments to `delete_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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 etag [::String] + # Optional. The etag associated with the partition. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new + # + # # Call the delete_partition method. + # result = client.delete_partition request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeletePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_partition.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_partition.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.delete_partition request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a metadata partition of an entity. + # + # @overload get_partition(request, options = nil) + # Pass arguments to `get_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetPartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_partition(name: nil) + # Pass arguments to `get_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new + # + # # Call the get_partition method. + # result = client.get_partition request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + # p result + # + def get_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetPartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_partition.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_partition.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.get_partition request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List metadata partitions of an entity. + # + # @overload list_partitions(request, options = nil) + # Pass arguments to `list_partitions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListPartitionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_partitions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new + # + # # Call the list_partitions method. + # result = client.list_partitions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. + # p item + # end + # + def list_partitions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListPartitionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_partitions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_partitions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_partitions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.list_partitions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_partitions, "partitions", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the MetadataService REST API. + # + # This class represents the configuration for MetadataService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_entity to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_entity.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_entity.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the MetadataService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entity + ## + # RPC-specific configuration for `update_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entity + ## + # RPC-specific configuration for `delete_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entity + ## + # RPC-specific configuration for `get_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entity + ## + # RPC-specific configuration for `list_entities` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entities + ## + # RPC-specific configuration for `create_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :create_partition + ## + # RPC-specific configuration for `delete_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_partition + ## + # RPC-specific configuration for `get_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :get_partition + ## + # RPC-specific configuration for `list_partitions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_partitions + + # @private + def initialize parent_rpcs = nil + create_entity_config = parent_rpcs.create_entity if parent_rpcs.respond_to? :create_entity + @create_entity = ::Gapic::Config::Method.new create_entity_config + update_entity_config = parent_rpcs.update_entity if parent_rpcs.respond_to? :update_entity + @update_entity = ::Gapic::Config::Method.new update_entity_config + delete_entity_config = parent_rpcs.delete_entity if parent_rpcs.respond_to? :delete_entity + @delete_entity = ::Gapic::Config::Method.new delete_entity_config + get_entity_config = parent_rpcs.get_entity if parent_rpcs.respond_to? :get_entity + @get_entity = ::Gapic::Config::Method.new get_entity_config + list_entities_config = parent_rpcs.list_entities if parent_rpcs.respond_to? :list_entities + @list_entities = ::Gapic::Config::Method.new list_entities_config + create_partition_config = parent_rpcs.create_partition if parent_rpcs.respond_to? :create_partition + @create_partition = ::Gapic::Config::Method.new create_partition_config + delete_partition_config = parent_rpcs.delete_partition if parent_rpcs.respond_to? :delete_partition + @delete_partition = ::Gapic::Config::Method.new delete_partition_config + get_partition_config = parent_rpcs.get_partition if parent_rpcs.respond_to? :get_partition + @get_partition = ::Gapic::Config::Method.new get_partition_config + list_partitions_config = parent_rpcs.list_partitions if parent_rpcs.respond_to? :list_partitions + @list_partitions = ::Gapic::Config::Method.new list_partitions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb new file mode 100644 index 000000000000..6c1684ce4a3c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb @@ -0,0 +1,603 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/metadata_pb" + +module Google + module Cloud + module Dataplex + module V1 + module MetadataService + module Rest + ## + # REST service stub for the MetadataService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the create_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # A result object deserialized from the server's reply + def create_entity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_entity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entity.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # A result object deserialized from the server's reply + def update_entity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_entity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entity.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_entity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_entity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # A result object deserialized from the server's reply + def get_entity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_entity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entity.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_entities REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntitiesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntitiesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntitiesResponse] + # A result object deserialized from the server's reply + def list_entities request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_entities_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreatePartitionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # A result object deserialized from the server's reply + def create_partition request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_partition_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Partition.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeletePartitionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_partition request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_partition_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetPartitionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # A result object deserialized from the server's reply + def get_partition request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_partition_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Partition.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_partitions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListPartitionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListPartitionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListPartitionsResponse] + # A result object deserialized from the server's reply + def list_partitions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_partitions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the create_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_entity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/entities", + body: "entity", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_entity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1/{entity.name}", + body: "entity", + matches: [ + ["entity.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_entity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_entity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_entities REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntitiesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_entities_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/entities", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreatePartitionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_partition_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/partitions", + body: "partition", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeletePartitionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_partition_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetPartitionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_partition_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_partitions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListPartitionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_partitions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/partitions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb new file mode 100644 index 000000000000..4758e42b9719 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/metadata.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# + +require 'grpc' +require 'google/cloud/dataplex/v1/metadata_pb' + +module Google + module Cloud + module Dataplex + module V1 + module MetadataService + # Metadata service manages metadata resources such as tables, filesets and + # partitions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.MetadataService' + + # Create a metadata entity. + rpc :CreateEntity, ::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Google::Cloud::Dataplex::V1::Entity + # Update a metadata entity. Only supports full resource update. + rpc :UpdateEntity, ::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Google::Cloud::Dataplex::V1::Entity + # Delete a metadata entity. + rpc :DeleteEntity, ::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Google::Protobuf::Empty + # Get a metadata entity. + rpc :GetEntity, ::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Google::Cloud::Dataplex::V1::Entity + # List metadata entities in a zone. + rpc :ListEntities, ::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Google::Cloud::Dataplex::V1::ListEntitiesResponse + # Create a metadata partition. + rpc :CreatePartition, ::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Google::Cloud::Dataplex::V1::Partition + # Delete a metadata partition. + rpc :DeletePartition, ::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Google::Protobuf::Empty + # Get a metadata partition of an entity. + rpc :GetPartition, ::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Google::Cloud::Dataplex::V1::Partition + # List metadata partitions of an entity. + rpc :ListPartitions, ::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Google::Cloud::Dataplex::V1::ListPartitionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb new file mode 100644 index 000000000000..49ecd409bebe --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/processing.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n)google/cloud/dataplex/v1/processing.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xbd\x01\n\x07Trigger\x12?\n\ton_demand\x18\x64 \x01(\x0b\x32*.google.cloud.dataplex.v1.Trigger.OnDemandH\x00\x12>\n\x08schedule\x18\x65 \x01(\x0b\x32*.google.cloud.dataplex.v1.Trigger.ScheduleH\x00\x1a\n\n\x08OnDemand\x1a\x1d\n\x08Schedule\x12\x11\n\x04\x63ron\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x06\n\x04mode\"i\n\nDataSource\x12\x38\n\x06\x65ntity\x18\x64 \x01(\tB&\xe0\x41\x05\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/EntityH\x00\x12\x17\n\x08resource\x18\x65 \x01(\tB\x03\xe0\x41\x05H\x00\x42\x08\n\x06source\"\xaf\x01\n\x0bScannedData\x12S\n\x11incremental_field\x18\x01 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.ScannedData.IncrementalFieldH\x00\x1a=\n\x10IncrementalField\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\r\n\x05start\x18\x02 \x01(\t\x12\x0b\n\x03\x65nd\x18\x03 \x01(\tB\x0c\n\ndata_rangeBk\n\x1c\x63om.google.cloud.dataplex.v1B\x0fProcessingProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger").msgclass + Trigger::OnDemand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger.OnDemand").msgclass + Trigger::Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger.Schedule").msgclass + DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataSource").msgclass + ScannedData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ScannedData").msgclass + ScannedData::IncrementalField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ScannedData.IncrementalField").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb new file mode 100644 index 000000000000..9588f77a6f82 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n(google/cloud/dataplex/v1/resources.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfa\x07\n\x04Lake\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x06 \x03(\x0b\x32*.google.cloud.dataplex.v1.Lake.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x1c\n\x0fservice_account\x18\t \x01(\tB\x03\xe0\x41\x03\x12@\n\tmetastore\x18\x66 \x01(\x0b\x32(.google.cloud.dataplex.v1.Lake.MetastoreB\x03\xe0\x41\x01\x12@\n\x0c\x61sset_status\x18g \x01(\x0b\x32%.google.cloud.dataplex.v1.AssetStatusB\x03\xe0\x41\x03\x12M\n\x10metastore_status\x18h \x01(\x0b\x32..google.cloud.dataplex.v1.Lake.MetastoreStatusB\x03\xe0\x41\x03\x1a!\n\tMetastore\x12\x14\n\x07service\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xf8\x01\n\x0fMetastoreStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Lake.MetastoreStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x65ndpoint\x18\x04 \x01(\t\"L\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:W\xea\x41T\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x34projects/{project}/locations/{location}/lakes/{lake}\"~\n\x0b\x41ssetStatus\x12/\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\ractive_assets\x18\x02 \x01(\x05\x12\'\n\x1fsecurity_policy_applying_assets\x18\x03 \x01(\x05\"\xf4\x0b\n\x04Zone\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x06 \x03(\x0b\x32*.google.cloud.dataplex.v1.Zone.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x39\n\x04type\x18\t \x01(\x0e\x32#.google.cloud.dataplex.v1.Zone.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12I\n\x0e\x64iscovery_spec\x18g \x01(\x0b\x32,.google.cloud.dataplex.v1.Zone.DiscoverySpecB\x03\xe0\x41\x01\x12G\n\rresource_spec\x18h \x01(\x0b\x32+.google.cloud.dataplex.v1.Zone.ResourceSpecB\x03\xe0\x41\x02\x12@\n\x0c\x61sset_status\x18i \x01(\x0b\x32%.google.cloud.dataplex.v1.AssetStatusB\x03\xe0\x41\x03\x1a\xbb\x01\n\x0cResourceSpec\x12W\n\rlocation_type\x18\x01 \x01(\x0e\x32\x38.google.cloud.dataplex.v1.Zone.ResourceSpec.LocationTypeB\x06\xe0\x41\x02\xe0\x41\x05\"R\n\x0cLocationType\x12\x1d\n\x19LOCATION_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSINGLE_REGION\x10\x01\x12\x10\n\x0cMULTI_REGION\x10\x02\x1a\xf6\x03\n\rDiscoverySpec\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1d\n\x10include_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12Q\n\x0b\x63sv_options\x18\x04 \x01(\x0b\x32\x37.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptionsB\x03\xe0\x41\x01\x12S\n\x0cjson_options\x18\x05 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptionsB\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\n \x01(\tB\x03\xe0\x41\x01H\x00\x1az\n\nCsvOptions\x12\x18\n\x0bheader_rows\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\t\n\x07trigger\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03RAW\x10\x01\x12\x0b\n\x07\x43URATED\x10\x02:d\xea\x41\x61\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x41projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}\"\xab\x11\n\x06\x41\x63tion\x12;\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32).google.cloud.dataplex.v1.Action.Category\x12\r\n\x05issue\x18\x02 \x01(\t\x12/\n\x0b\x64\x65tect_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x04name\x18\x05 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Action\x12\x32\n\x04lake\x18\x06 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x32\n\x04zone\x18\x07 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x34\n\x05\x61sset\x18\x08 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x16\n\x0e\x64\x61ta_locations\x18\t \x03(\t\x12Q\n\x13invalid_data_format\x18\n \x01(\x0b\x32\x32.google.cloud.dataplex.v1.Action.InvalidDataFormatH\x00\x12[\n\x18incompatible_data_schema\x18\x0b \x01(\x0b\x32\x37.google.cloud.dataplex.v1.Action.IncompatibleDataSchemaH\x00\x12W\n\x16invalid_data_partition\x18\x0c \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Action.InvalidDataPartitionH\x00\x12\x44\n\x0cmissing_data\x18\r \x01(\x0b\x32,.google.cloud.dataplex.v1.Action.MissingDataH\x00\x12L\n\x10missing_resource\x18\x0e \x01(\x0b\x32\x30.google.cloud.dataplex.v1.Action.MissingResourceH\x00\x12V\n\x15unauthorized_resource\x18\x0f \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Action.UnauthorizedResourceH\x00\x12\x62\n\x1c\x66\x61iled_security_policy_apply\x18\x15 \x01(\x0b\x32:.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApplyH\x00\x12]\n\x19invalid_data_organization\x18\x16 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Action.InvalidDataOrganizationH\x00\x1a\x11\n\x0fMissingResource\x1a\x16\n\x14UnauthorizedResource\x1a*\n\x19\x46\x61iledSecurityPolicyApply\x12\r\n\x05\x61sset\x18\x01 \x01(\t\x1a`\n\x11InvalidDataFormat\x12\x1e\n\x16sampled_data_locations\x18\x01 \x03(\t\x12\x17\n\x0f\x65xpected_format\x18\x02 \x01(\t\x12\x12\n\nnew_format\x18\x03 \x01(\t\x1a\xa0\x02\n\x16IncompatibleDataSchema\x12\r\n\x05table\x18\x01 \x01(\t\x12\x17\n\x0f\x65xisting_schema\x18\x02 \x01(\t\x12\x12\n\nnew_schema\x18\x03 \x01(\t\x12\x1e\n\x16sampled_data_locations\x18\x04 \x03(\t\x12[\n\rschema_change\x18\x05 \x01(\x0e\x32\x44.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange\"M\n\x0cSchemaChange\x12\x1d\n\x19SCHEMA_CHANGE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINCOMPATIBLE\x10\x01\x12\x0c\n\x08MODIFIED\x10\x02\x1a\xe1\x01\n\x14InvalidDataPartition\x12\x64\n\x12\x65xpected_structure\x18\x01 \x01(\x0e\x32H.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure\"c\n\x12PartitionStructure\x12#\n\x1fPARTITION_STRUCTURE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43ONSISTENT_KEYS\x10\x01\x12\x13\n\x0fHIVE_STYLE_KEYS\x10\x02\x1a\r\n\x0bMissingData\x1a\x19\n\x17InvalidDataOrganization\"f\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x17\n\x13RESOURCE_MANAGEMENT\x10\x01\x12\x13\n\x0fSECURITY_POLICY\x10\x02\x12\x12\n\x0e\x44\x41TA_DISCOVERY\x10\x03:\xa2\x02\xea\x41\x9e\x02\n\x1e\x64\x61taplex.googleapis.com/Action\x12\x45projects/{project}/locations/{location}/lakes/{lake}/actions/{action}\x12Rprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}\x12\x61projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}B\t\n\x07\x64\x65tails\"\xa4\x15\n\x05\x41sset\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x06labels\x18\x06 \x03(\x0b\x32+.google.cloud.dataplex.v1.Asset.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12H\n\rresource_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.Asset.ResourceSpecB\x03\xe0\x41\x02\x12L\n\x0fresource_status\x18\x65 \x01(\x0b\x32..google.cloud.dataplex.v1.Asset.ResourceStatusB\x03\xe0\x41\x03\x12L\n\x0fsecurity_status\x18g \x01(\x0b\x32..google.cloud.dataplex.v1.Asset.SecurityStatusB\x03\xe0\x41\x03\x12J\n\x0e\x64iscovery_spec\x18j \x01(\x0b\x32-.google.cloud.dataplex.v1.Asset.DiscoverySpecB\x03\xe0\x41\x01\x12N\n\x10\x64iscovery_status\x18k \x01(\x0b\x32/.google.cloud.dataplex.v1.Asset.DiscoveryStatusB\x03\xe0\x41\x03\x1a\xdb\x01\n\x0eSecurityStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Asset.SecurityStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"B\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x41PPLYING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x1a\xf8\x03\n\rDiscoverySpec\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10include_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12R\n\x0b\x63sv_options\x18\x04 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptionsB\x03\xe0\x41\x01\x12T\n\x0cjson_options\x18\x05 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptionsB\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\n \x01(\tB\x03\xe0\x41\x01H\x00\x1az\n\nCsvOptions\x12\x18\n\x0bheader_rows\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\t\n\x07trigger\x1a\xce\x02\n\x0cResourceSpec\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12G\n\x04type\x18\x02 \x01(\x0e\x32\x31.google.cloud.dataplex.v1.Asset.ResourceSpec.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12V\n\x10read_access_mode\x18\x05 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessModeB\x03\xe0\x41\x01\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTORAGE_BUCKET\x10\x01\x12\x14\n\x10\x42IGQUERY_DATASET\x10\x02\"B\n\nAccessMode\x12\x1b\n\x17\x41\x43\x43\x45SS_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44IRECT\x10\x01\x12\x0b\n\x07MANAGED\x10\x02\x1a\xf3\x01\n\x0eResourceStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Asset.ResourceStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12$\n\x17managed_access_identity\x18\x04 \x01(\tB\x03\xe0\x41\x03\"4\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x1a\xf4\x03\n\x0f\x44iscoveryStatus\x12\x44\n\x05state\x18\x01 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_run_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x05stats\x18\x06 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats\x12\x34\n\x11last_run_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x1aP\n\x05Stats\x12\x12\n\ndata_items\x18\x01 \x01(\x03\x12\x11\n\tdata_size\x18\x02 \x01(\x03\x12\x0e\n\x06tables\x18\x03 \x01(\x03\x12\x10\n\x08\x66ilesets\x18\x04 \x01(\x03\"X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\x0c\n\x08\x44ISABLED\x10\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n\x1d\x64\x61taplex.googleapis.com/Asset\x12Pprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}*[\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x13\n\x0f\x41\x43TION_REQUIRED\x10\x04\x42j\n\x1c\x63om.google.cloud.dataplex.v1B\x0eResourcesProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + Lake = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake").msgclass + Lake::Metastore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.Metastore").msgclass + Lake::MetastoreStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.MetastoreStatus").msgclass + Lake::MetastoreStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.MetastoreStatus.State").enummodule + AssetStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AssetStatus").msgclass + Zone = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone").msgclass + Zone::ResourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.ResourceSpec").msgclass + Zone::ResourceSpec::LocationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType").enummodule + Zone::DiscoverySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec").msgclass + Zone::DiscoverySpec::CsvOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions").msgclass + Zone::DiscoverySpec::JsonOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions").msgclass + Zone::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.Type").enummodule + Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action").msgclass + Action::MissingResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.MissingResource").msgclass + Action::UnauthorizedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.UnauthorizedResource").msgclass + Action::FailedSecurityPolicyApply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply").msgclass + Action::InvalidDataFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataFormat").msgclass + Action::IncompatibleDataSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.IncompatibleDataSchema").msgclass + Action::IncompatibleDataSchema::SchemaChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange").enummodule + Action::InvalidDataPartition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataPartition").msgclass + Action::InvalidDataPartition::PartitionStructure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure").enummodule + Action::MissingData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.MissingData").msgclass + Action::InvalidDataOrganization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataOrganization").msgclass + Action::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.Category").enummodule + Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset").msgclass + Asset::SecurityStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.SecurityStatus").msgclass + Asset::SecurityStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.SecurityStatus.State").enummodule + Asset::DiscoverySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec").msgclass + Asset::DiscoverySpec::CsvOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions").msgclass + Asset::DiscoverySpec::JsonOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions").msgclass + Asset::ResourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec").msgclass + Asset::ResourceSpec::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec.Type").enummodule + Asset::ResourceSpec::AccessMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode").enummodule + Asset::ResourceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceStatus").msgclass + Asset::ResourceStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceStatus.State").enummodule + Asset::DiscoveryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus").msgclass + Asset::DiscoveryStatus::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats").msgclass + Asset::DiscoveryStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus.State").enummodule + State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb new file mode 100644 index 000000000000..ef6ed7dc41ff --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/dataplex_service/rest" +require "google/cloud/dataplex/v1/catalog_service/rest" +require "google/cloud/dataplex/v1/content_service/rest" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest" +require "google/cloud/dataplex/v1/data_scan_service/rest" +require "google/cloud/dataplex/v1/metadata_service/rest" +require "google/cloud/dataplex/v1/bindings_override" +require "google/cloud/dataplex/v1/version" + +module Google + module Cloud + module Dataplex + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/dataplex/v1/rest" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb new file mode 100644 index 000000000000..0afab5d5d3ac --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/security.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\'google/cloud/dataplex/v1/security.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\"U\n\x12ResourceAccessSpec\x12\x14\n\x07readers\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x14\n\x07writers\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06owners\x18\x03 \x03(\tB\x03\xe0\x41\x01\"&\n\x0e\x44\x61taAccessSpec\x12\x14\n\x07readers\x18\x01 \x03(\tB\x03\xe0\x41\x01\x42i\n\x1c\x63om.google.cloud.dataplex.v1B\rSecurityProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + ResourceAccessSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ResourceAccessSpec").msgclass + DataAccessSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAccessSpec").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb new file mode 100644 index 000000000000..f7926ab78db0 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/analyze_pb' +require 'google/cloud/dataplex/v1/resources_pb' +require 'google/cloud/dataplex/v1/tasks_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/dataplex/v1/service.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/analyze.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a$google/cloud/dataplex/v1/tasks.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x01\n\x11\x43reateLakeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x14\n\x07lake_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x04lake\x18\x03 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.LakeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x11UpdateLakeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x31\n\x04lake\x18\x02 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.LakeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x11\x44\x65leteLakeRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\"\xaa\x01\n\x10ListLakesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x11ListLakesResponse\x12-\n\x05lakes\x18\x01 \x03(\x0b\x32\x1e.google.cloud.dataplex.v1.Lake\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"\x7f\n\x16ListLakeActionsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"a\n\x13ListActionsResponse\x12\x31\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32 .google.cloud.dataplex.v1.Action\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"D\n\x0eGetLakeRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\"\xae\x01\n\x11\x43reateZoneRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x14\n\x07zone_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x04zone\x18\x03 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.ZoneB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x11UpdateZoneRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x31\n\x04zone\x18\x02 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.ZoneB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x11\x44\x65leteZoneRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\"\xa5\x01\n\x10ListZonesRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"[\n\x11ListZonesResponse\x12-\n\x05zones\x18\x01 \x03(\x0b\x32\x1e.google.cloud.dataplex.v1.Zone\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x7f\n\x16ListZoneActionsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"D\n\x0eGetZoneRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\"\xb2\x01\n\x12\x43reateAssetRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x15\n\x08\x61sset_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x05\x61sset\x18\x03 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.AssetB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x9b\x01\n\x12UpdateAssetRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x33\n\x05\x61sset\x18\x02 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.AssetB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"I\n\x12\x44\x65leteAssetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\"\xa6\x01\n\x11ListAssetsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"^\n\x12ListAssetsResponse\x12/\n\x06\x61ssets\x18\x01 \x03(\x0b\x32\x1f.google.cloud.dataplex.v1.Asset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x81\x01\n\x17ListAssetActionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"F\n\x0fGetAssetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xae\x01\n\x11\x43reateTaskRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x14\n\x07task_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x04task\x18\x03 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.TaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x11UpdateTaskRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x31\n\x04task\x18\x02 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.TaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x11\x44\x65leteTaskRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\"\xa5\x01\n\x10ListTasksRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x11ListTasksResponse\x12-\n\x05tasks\x18\x01 \x03(\x0b\x32\x1e.google.cloud.dataplex.v1.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"D\n\x0eGetTaskRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\"B\n\rGetJobRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x64\x61taplex.googleapis.com/Job\"\xb2\x02\n\x0eRunTaskRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.RunTaskRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x45\n\x04\x61rgs\x18\x04 \x03(\x0b\x32\x32.google.cloud.dataplex.v1.RunTaskRequest.ArgsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"=\n\x0fRunTaskResponse\x12*\n\x03job\x18\x01 \x01(\x0b\x32\x1d.google.cloud.dataplex.v1.Job\"x\n\x0fListJobsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"X\n\x10ListJobsResponse\x12+\n\x04jobs\x18\x01 \x03(\x0b\x32\x1d.google.cloud.dataplex.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"E\n\x10\x43\x61ncelJobRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x64\x61taplex.googleapis.com/Job\"\xca\x01\n\x18\x43reateEnvironmentRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x1b\n\x0e\x65nvironment_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0b\x65nvironment\x18\x03 \x01(\x0b\x32%.google.cloud.dataplex.v1.EnvironmentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xad\x01\n\x18UpdateEnvironmentRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12?\n\x0b\x65nvironment\x18\x02 \x01(\x0b\x32%.google.cloud.dataplex.v1.EnvironmentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"U\n\x18\x44\x65leteEnvironmentRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/Environment\"\xac\x01\n\x17ListEnvironmentsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"p\n\x18ListEnvironmentsResponse\x12;\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32%.google.cloud.dataplex.v1.Environment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x15GetEnvironmentRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/Environment\"\x98\x01\n\x13ListSessionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/Environment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"d\n\x14ListSessionsResponse\x12\x33\n\x08sessions\x18\x01 \x03(\x0b\x32!.google.cloud.dataplex.v1.Session\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xac\x32\n\x0f\x44\x61taplexService\x12\xc3\x01\n\nCreateLake\x12+.google.cloud.dataplex.v1.CreateLakeRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41\x19\n\x04Lake\x12\x11OperationMetadata\xda\x41\x13parent,lake,lake_id\x82\xd3\xe4\x93\x02\x31\")/v1/{parent=projects/*/locations/*}/lakes:\x04lake\x12\xc5\x01\n\nUpdateLake\x12+.google.cloud.dataplex.v1.UpdateLakeRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41\x19\n\x04Lake\x12\x11OperationMetadata\xda\x41\x10lake,update_mask\x82\xd3\xe4\x93\x02\x36\x32./v1/{lake.name=projects/*/locations/*/lakes/*}:\x04lake\x12\xbf\x01\n\nDeleteLake\x12+.google.cloud.dataplex.v1.DeleteLakeRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02+*)/v1/{name=projects/*/locations/*/lakes/*}\x12\xa0\x01\n\tListLakes\x12*.google.cloud.dataplex.v1.ListLakesRequest\x1a+.google.cloud.dataplex.v1.ListLakesResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/v1/{parent=projects/*/locations/*}/lakes\x12\x8d\x01\n\x07GetLake\x12(.google.cloud.dataplex.v1.GetLakeRequest\x1a\x1e.google.cloud.dataplex.v1.Lake\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/v1/{name=projects/*/locations/*/lakes/*}\x12\xb8\x01\n\x0fListLakeActions\x12\x30.google.cloud.dataplex.v1.ListLakeActionsRequest\x1a-.google.cloud.dataplex.v1.ListActionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*/lakes/*}/actions\x12\xcb\x01\n\nCreateZone\x12+.google.cloud.dataplex.v1.CreateZoneRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41\x19\n\x04Zone\x12\x11OperationMetadata\xda\x41\x13parent,zone,zone_id\x82\xd3\xe4\x93\x02\x39\"1/v1/{parent=projects/*/locations/*/lakes/*}/zones:\x04zone\x12\xcd\x01\n\nUpdateZone\x12+.google.cloud.dataplex.v1.UpdateZoneRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x19\n\x04Zone\x12\x11OperationMetadata\xda\x41\x10zone,update_mask\x82\xd3\xe4\x93\x02>26/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}:\x04zone\x12\xc7\x01\n\nDeleteZone\x12+.google.cloud.dataplex.v1.DeleteZoneRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/lakes/*/zones/*}\x12\xa8\x01\n\tListZones\x12*.google.cloud.dataplex.v1.ListZonesRequest\x1a+.google.cloud.dataplex.v1.ListZonesResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*/lakes/*}/zones\x12\x95\x01\n\x07GetZone\x12(.google.cloud.dataplex.v1.GetZoneRequest\x1a\x1e.google.cloud.dataplex.v1.Zone\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/lakes/*/zones/*}\x12\xc0\x01\n\x0fListZoneActions\x12\x30.google.cloud.dataplex.v1.ListZoneActionsRequest\x1a-.google.cloud.dataplex.v1.ListActionsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions\x12\xda\x01\n\x0b\x43reateAsset\x12,.google.cloud.dataplex.v1.CreateAssetRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x1a\n\x05\x41sset\x12\x11OperationMetadata\xda\x41\x15parent,asset,asset_id\x82\xd3\xe4\x93\x02\x43\":/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets:\x05\x61sset\x12\xdd\x01\n\x0bUpdateAsset\x12,.google.cloud.dataplex.v1.UpdateAssetRequest\x1a\x1d.google.longrunning.Operation\"\x80\x01\xca\x41\x1a\n\x05\x41sset\x12\x11OperationMetadata\xda\x41\x11\x61sset,update_mask\x82\xd3\xe4\x93\x02I2@/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}:\x05\x61sset\x12\xd2\x01\n\x0b\x44\x65leteAsset\x12,.google.cloud.dataplex.v1.DeleteAssetRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}\x12\xb4\x01\n\nListAssets\x12+.google.cloud.dataplex.v1.ListAssetsRequest\x1a,.google.cloud.dataplex.v1.ListAssetsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets\x12\xa1\x01\n\x08GetAsset\x12).google.cloud.dataplex.v1.GetAssetRequest\x1a\x1f.google.cloud.dataplex.v1.Asset\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}\x12\xcb\x01\n\x10ListAssetActions\x12\x31.google.cloud.dataplex.v1.ListAssetActionsRequest\x1a-.google.cloud.dataplex.v1.ListActionsResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions\x12\xcb\x01\n\nCreateTask\x12+.google.cloud.dataplex.v1.CreateTaskRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41\x19\n\x04Task\x12\x11OperationMetadata\xda\x41\x13parent,task,task_id\x82\xd3\xe4\x93\x02\x39\"1/v1/{parent=projects/*/locations/*/lakes/*}/tasks:\x04task\x12\xcd\x01\n\nUpdateTask\x12+.google.cloud.dataplex.v1.UpdateTaskRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x19\n\x04Task\x12\x11OperationMetadata\xda\x41\x10task,update_mask\x82\xd3\xe4\x93\x02>26/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}:\x04task\x12\xc7\x01\n\nDeleteTask\x12+.google.cloud.dataplex.v1.DeleteTaskRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/lakes/*/tasks/*}\x12\xa8\x01\n\tListTasks\x12*.google.cloud.dataplex.v1.ListTasksRequest\x1a+.google.cloud.dataplex.v1.ListTasksResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*/lakes/*}/tasks\x12\x95\x01\n\x07GetTask\x12(.google.cloud.dataplex.v1.GetTaskRequest\x1a\x1e.google.cloud.dataplex.v1.Task\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/lakes/*/tasks/*}\x12\xac\x01\n\x08ListJobs\x12).google.cloud.dataplex.v1.ListJobsRequest\x1a*.google.cloud.dataplex.v1.ListJobsResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs\x12\xa7\x01\n\x07RunTask\x12(.google.cloud.dataplex.v1.RunTaskRequest\x1a).google.cloud.dataplex.v1.RunTaskResponse\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run:\x01*\x12\x99\x01\n\x06GetJob\x12\'.google.cloud.dataplex.v1.GetJobRequest\x1a\x1d.google.cloud.dataplex.v1.Job\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}\x12\xa2\x01\n\tCancelJob\x12*.google.cloud.dataplex.v1.CancelJobRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\"?/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel:\x01*\x12\xfd\x01\n\x11\x43reateEnvironment\x12\x32.google.cloud.dataplex.v1.CreateEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41 \n\x0b\x45nvironment\x12\x11OperationMetadata\xda\x41!parent,environment,environment_id\x82\xd3\xe4\x93\x02G\"8/v1/{parent=projects/*/locations/*/lakes/*}/environments:\x0b\x65nvironment\x12\xff\x01\n\x11UpdateEnvironment\x12\x32.google.cloud.dataplex.v1.UpdateEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41 \n\x0b\x45nvironment\x12\x11OperationMetadata\xda\x41\x17\x65nvironment,update_mask\x82\xd3\xe4\x93\x02S2D/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}:\x0b\x65nvironment\x12\xdc\x01\n\x11\x44\x65leteEnvironment\x12\x32.google.cloud.dataplex.v1.DeleteEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/lakes/*/environments/*}\x12\xc4\x01\n\x10ListEnvironments\x12\x31.google.cloud.dataplex.v1.ListEnvironmentsRequest\x1a\x32.google.cloud.dataplex.v1.ListEnvironmentsResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/lakes/*}/environments\x12\xb1\x01\n\x0eGetEnvironment\x12/.google.cloud.dataplex.v1.GetEnvironmentRequest\x1a%.google.cloud.dataplex.v1.Environment\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/lakes/*/environments/*}\x12\xc3\x01\n\x0cListSessions\x12-.google.cloud.dataplex.v1.ListSessionsRequest\x1a..google.cloud.dataplex.v1.ListSessionsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBh\n\x1c\x63om.google.cloud.dataplex.v1B\x0cServiceProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.dataplex.v1.Lake", "google/cloud/dataplex/v1/resources.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.dataplex.v1.Task", "google/cloud/dataplex/v1/tasks.proto"], + ["google.cloud.dataplex.v1.Environment", "google/cloud/dataplex/v1/analyze.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + CreateLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateLakeRequest").msgclass + UpdateLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateLakeRequest").msgclass + DeleteLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteLakeRequest").msgclass + ListLakesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakesRequest").msgclass + ListLakesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakesResponse").msgclass + ListLakeActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakeActionsRequest").msgclass + ListActionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListActionsResponse").msgclass + GetLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetLakeRequest").msgclass + CreateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateZoneRequest").msgclass + UpdateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateZoneRequest").msgclass + DeleteZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteZoneRequest").msgclass + ListZonesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZonesRequest").msgclass + ListZonesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZonesResponse").msgclass + ListZoneActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZoneActionsRequest").msgclass + GetZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetZoneRequest").msgclass + CreateAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateAssetRequest").msgclass + UpdateAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateAssetRequest").msgclass + DeleteAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteAssetRequest").msgclass + ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetsRequest").msgclass + ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetsResponse").msgclass + ListAssetActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetActionsRequest").msgclass + GetAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetAssetRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.OperationMetadata").msgclass + CreateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateTaskRequest").msgclass + UpdateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateTaskRequest").msgclass + DeleteTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteTaskRequest").msgclass + ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListTasksRequest").msgclass + ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListTasksResponse").msgclass + GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetTaskRequest").msgclass + GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetJobRequest").msgclass + RunTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunTaskRequest").msgclass + RunTaskResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunTaskResponse").msgclass + ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListJobsRequest").msgclass + ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListJobsResponse").msgclass + CancelJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CancelJobRequest").msgclass + CreateEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEnvironmentRequest").msgclass + UpdateEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEnvironmentRequest").msgclass + DeleteEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEnvironmentRequest").msgclass + ListEnvironmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEnvironmentsRequest").msgclass + ListEnvironmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEnvironmentsResponse").msgclass + GetEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEnvironmentRequest").msgclass + ListSessionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListSessionsRequest").msgclass + ListSessionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListSessionsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb new file mode 100644 index 000000000000..c07e2ea39d8e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb @@ -0,0 +1,117 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/service.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# + +require 'grpc' +require 'google/cloud/dataplex/v1/service_pb' + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + # 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 Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.DataplexService' + + # Creates a lake resource. + rpc :CreateLake, ::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Google::Longrunning::Operation + # Updates a lake resource. + rpc :UpdateLake, ::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Google::Longrunning::Operation + # Deletes a lake resource. All zones within the lake must be deleted before + # the lake can be deleted. + rpc :DeleteLake, ::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Google::Longrunning::Operation + # Lists lake resources in a project and location. + rpc :ListLakes, ::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Google::Cloud::Dataplex::V1::ListLakesResponse + # Retrieves a lake resource. + rpc :GetLake, ::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Google::Cloud::Dataplex::V1::Lake + # Lists action resources in a lake. + rpc :ListLakeActions, ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse + # Creates a zone resource within a lake. + rpc :CreateZone, ::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Google::Longrunning::Operation + # Updates a zone resource. + rpc :UpdateZone, ::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Google::Longrunning::Operation + # Deletes a zone resource. All assets within a zone must be deleted before + # the zone can be deleted. + rpc :DeleteZone, ::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Google::Longrunning::Operation + # Lists zone resources in a lake. + rpc :ListZones, ::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Google::Cloud::Dataplex::V1::ListZonesResponse + # Retrieves a zone resource. + rpc :GetZone, ::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Google::Cloud::Dataplex::V1::Zone + # Lists action resources in a zone. + rpc :ListZoneActions, ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse + # Creates an asset resource. + rpc :CreateAsset, ::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Google::Longrunning::Operation + # Updates an asset resource. + rpc :UpdateAsset, ::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Google::Longrunning::Operation + # Deletes an asset resource. The referenced storage resource is detached + # (default) or deleted based on the associated Lifecycle policy. + rpc :DeleteAsset, ::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Google::Longrunning::Operation + # Lists asset resources in a zone. + rpc :ListAssets, ::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Google::Cloud::Dataplex::V1::ListAssetsResponse + # Retrieves an asset resource. + rpc :GetAsset, ::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Google::Cloud::Dataplex::V1::Asset + # Lists action resources in an asset. + rpc :ListAssetActions, ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse + # Creates a task resource within a lake. + rpc :CreateTask, ::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Google::Longrunning::Operation + # Update the task resource. + rpc :UpdateTask, ::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Google::Longrunning::Operation + # Delete the task resource. + rpc :DeleteTask, ::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Google::Longrunning::Operation + # Lists tasks under the given lake. + rpc :ListTasks, ::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Google::Cloud::Dataplex::V1::ListTasksResponse + # Get task resource. + rpc :GetTask, ::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Google::Cloud::Dataplex::V1::Task + # Lists Jobs under the given task. + rpc :ListJobs, ::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Google::Cloud::Dataplex::V1::ListJobsResponse + # Run an on demand execution of a Task. + rpc :RunTask, ::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Google::Cloud::Dataplex::V1::RunTaskResponse + # Get job resource. + rpc :GetJob, ::Google::Cloud::Dataplex::V1::GetJobRequest, ::Google::Cloud::Dataplex::V1::Job + # Cancel jobs running for the task resource. + rpc :CancelJob, ::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Google::Protobuf::Empty + # Create an environment resource. + rpc :CreateEnvironment, ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, ::Google::Longrunning::Operation + # Update the environment resource. + rpc :UpdateEnvironment, ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, ::Google::Longrunning::Operation + # Delete the environment resource. All the child resources must have been + # deleted before environment deletion can be initiated. + rpc :DeleteEnvironment, ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, ::Google::Longrunning::Operation + # Lists environments under the given lake. + rpc :ListEnvironments, ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse + # Get environment resource. + rpc :GetEnvironment, ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, ::Google::Cloud::Dataplex::V1::Environment + # Lists session resources in an environment. + rpc :ListSessions, ::Google::Cloud::Dataplex::V1::ListSessionsRequest, ::Google::Cloud::Dataplex::V1::ListSessionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb new file mode 100644 index 000000000000..81b3556fdcdd --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/tasks.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/resources_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n$google/cloud/dataplex/v1/tasks.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x16\n\x04Task\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x07 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x08 \x03(\x0b\x32*.google.cloud.dataplex.v1.Task.LabelsEntryB\x03\xe0\x41\x01\x12\x45\n\x0ctrigger_spec\x18\x64 \x01(\x0b\x32*.google.cloud.dataplex.v1.Task.TriggerSpecB\x03\xe0\x41\x02\x12I\n\x0e\x65xecution_spec\x18\x65 \x01(\x0b\x32,.google.cloud.dataplex.v1.Task.ExecutionSpecB\x03\xe0\x41\x02\x12N\n\x10\x65xecution_status\x18\xc9\x01 \x01(\x0b\x32..google.cloud.dataplex.v1.Task.ExecutionStatusB\x03\xe0\x41\x03\x12@\n\x05spark\x18\xac\x02 \x01(\x0b\x32..google.cloud.dataplex.v1.Task.SparkTaskConfigH\x00\x12\x46\n\x08notebook\x18\xae\x02 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.NotebookTaskConfigH\x00\x1a\x9a\x06\n\x12InfrastructureSpec\x12X\n\x05\x62\x61tch\x18\x34 \x01(\x0b\x32G.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResourcesH\x00\x12\x62\n\x0f\x63ontainer_image\x18\x65 \x01(\x0b\x32G.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntimeH\x01\x12T\n\x0bvpc_network\x18\x96\x01 \x01(\x0b\x32<.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetworkH\x02\x1aW\n\x15\x42\x61tchComputeResources\x12\x1c\n\x0f\x65xecutors_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12 \n\x13max_executors_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a\x86\x02\n\x15\x43ontainerImageRuntime\x12\x12\n\x05image\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tjava_jars\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fpython_packages\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12p\n\nproperties\x18\x04 \x03(\x0b\x32W.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.PropertiesEntryB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\nVpcNetwork\x12\x16\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1a\n\x0bsub_network\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\x0cnetwork_tags\x18\x03 \x03(\tB\x03\xe0\x41\x01\x42\x0e\n\x0cnetwork_nameB\x0b\n\tresourcesB\t\n\x07runtimeB\t\n\x07network\x1a\x9a\x02\n\x0bTriggerSpec\x12\x45\n\x04type\x18\x05 \x01(\x0e\x32/.google.cloud.dataplex.v1.Task.TriggerSpec.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x33\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_retries\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\x64 \x01(\tB\x03\xe0\x41\x01H\x00\":\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\r\n\tRECURRING\x10\x02\x42\t\n\x07trigger\x1a\x95\x02\n\rExecutionSpec\x12I\n\x04\x61rgs\x18\x04 \x03(\x0b\x32\x36.google.cloud.dataplex.v1.Task.ExecutionSpec.ArgsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07project\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x1amax_job_execution_lifetime\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x14\n\x07kms_key\x18\t \x01(\tB\x03\xe0\x41\x01\x1a+\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xa5\x02\n\x0fSparkTaskConfig\x12\x1b\n\x11main_jar_file_uri\x18\x64 \x01(\tH\x00\x12\x14\n\nmain_class\x18\x65 \x01(\tH\x00\x12\x1c\n\x12python_script_file\x18\x66 \x01(\tH\x00\x12\x19\n\x0fsql_script_file\x18h \x01(\tH\x00\x12\x14\n\nsql_script\x18i \x01(\tH\x00\x12\x16\n\tfile_uris\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61rchive_uris\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12S\n\x13infrastructure_spec\x18\x06 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.InfrastructureSpecB\x03\xe0\x41\x01\x42\x08\n\x06\x64river\x1a\xb3\x01\n\x12NotebookTaskConfig\x12\x15\n\x08notebook\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12S\n\x13infrastructure_spec\x18\x03 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.InfrastructureSpecB\x03\xe0\x41\x01\x12\x16\n\tfile_uris\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61rchive_uris\x18\x06 \x03(\tB\x03\xe0\x41\x01\x1a\x7f\n\x0f\x45xecutionStatus\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\nlatest_job\x18\t \x01(\x0b\x32\x1d.google.cloud.dataplex.v1.JobB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:d\xea\x41\x61\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x41projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}B\x08\n\x06\x63onfig\"\xc5\x07\n\x03Job\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x03\xfa\x41\x1d\n\x1b\x64\x61taplex.googleapis.com/Job\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x05state\x18\x05 \x01(\x0e\x32#.google.cloud.dataplex.v1.Job.StateB\x03\xe0\x41\x03\x12\x18\n\x0bretry_count\x18\x06 \x01(\rB\x03\xe0\x41\x03\x12;\n\x07service\x18\x07 \x01(\x0e\x32%.google.cloud.dataplex.v1.Job.ServiceB\x03\xe0\x41\x03\x12\x18\n\x0bservice_job\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\t \x01(\tB\x03\xe0\x41\x03\x12>\n\x06labels\x18\n \x03(\x0b\x32).google.cloud.dataplex.v1.Job.LabelsEntryB\x03\xe0\x41\x03\x12;\n\x07trigger\x18\x0b \x01(\x0e\x32%.google.cloud.dataplex.v1.Job.TriggerB\x03\xe0\x41\x03\x12I\n\x0e\x65xecution_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.Task.ExecutionSpecB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"0\n\x07Service\x12\x17\n\x13SERVICE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TAPROC\x10\x01\"r\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0e\n\nCANCELLING\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0b\n\x07\x41\x42ORTED\x10\x06\"D\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTASK_CONFIG\x10\x01\x12\x0f\n\x0bRUN_REQUEST\x10\x02:n\xea\x41k\n\x1b\x64\x61taplex.googleapis.com/Job\x12Lprojects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}Bf\n\x1c\x63om.google.cloud.dataplex.v1B\nTasksProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task").msgclass + Task::InfrastructureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec").msgclass + Task::InfrastructureSpec::BatchComputeResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources").msgclass + Task::InfrastructureSpec::ContainerImageRuntime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime").msgclass + Task::InfrastructureSpec::VpcNetwork = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork").msgclass + Task::TriggerSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.TriggerSpec").msgclass + Task::TriggerSpec::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.TriggerSpec.Type").enummodule + Task::ExecutionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.ExecutionSpec").msgclass + Task::SparkTaskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.SparkTaskConfig").msgclass + Task::NotebookTaskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.NotebookTaskConfig").msgclass + Task::ExecutionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.ExecutionStatus").msgclass + Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job").msgclass + Job::Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.Service").enummodule + Job::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.State").enummodule + Job::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.Trigger").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb new file mode 100644 index 000000000000..5ab8544710fa --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md new file mode 100644 index 000000000000..b4aad34dcd67 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Dataplex V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..934c39849a6a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb @@ -0,0 +1,399 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: + # seconds: 60 # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: + # seconds: 360 # 6 minutes + # total_poll_timeout: + # seconds: 54000 # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..b03587481349 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..38b4b61e6061 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..6497ebc78dc1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same + # concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb new file mode 100644 index 000000000000..eda6a23185b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb @@ -0,0 +1,290 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # Environment represents a user-visible compute infrastructure for analytics + # within a lake. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the environment, of the form: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/environment/\\{environment_id} + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Environment creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the environment was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined labels for the environment. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the environment. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the environment. + # @!attribute [rw] infrastructure_spec + # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec] + # Required. Infrastructure specification for the Environment. + # @!attribute [rw] session_spec + # @return [::Google::Cloud::Dataplex::V1::Environment::SessionSpec] + # Optional. Configuration for sessions created for this environment. + # @!attribute [r] session_status + # @return [::Google::Cloud::Dataplex::V1::Environment::SessionStatus] + # Output only. Status of sessions created for this environment. + # @!attribute [r] endpoints + # @return [::Google::Cloud::Dataplex::V1::Environment::Endpoints] + # Output only. URI Endpoints to access sessions associated with the + # Environment. + class Environment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for the underlying infrastructure used to run workloads. + # @!attribute [rw] compute + # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec::ComputeResources] + # Optional. Compute resources needed for analyze interactive workloads. + # @!attribute [rw] os_image + # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec::OsImageRuntime] + # Required. Software Runtime Configuration for analyze interactive + # workloads. + class InfrastructureSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Compute resources associated with the analyze interactive workloads. + # @!attribute [rw] disk_size_gb + # @return [::Integer] + # Optional. Size in GB of the disk. Default is 100 GB. + # @!attribute [rw] node_count + # @return [::Integer] + # Optional. Total number of nodes in the sessions created for this + # environment. + # @!attribute [rw] max_node_count + # @return [::Integer] + # Optional. Max configurable nodes. + # If max_node_count > node_count, then auto-scaling is enabled. + class ComputeResources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Software Runtime Configuration to run Analyze. + # @!attribute [rw] image_version + # @return [::String] + # Required. Dataplex Image version. + # @!attribute [rw] java_libraries + # @return [::Array<::String>] + # 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 + # @!attribute [rw] python_packages + # @return [::Array<::String>] + # 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 + # @!attribute [rw] properties + # @return [::Google::Protobuf::Map{::String => ::String}] + # 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". + class OsImageRuntime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class PropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Configuration for sessions created for this environment. + # @!attribute [rw] max_idle_duration + # @return [::Google::Protobuf::Duration] + # Optional. The idle time configuration of the session. The session will be + # auto-terminated at the end of this period. + # @!attribute [rw] enable_fast_startup + # @return [::Boolean] + # 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. + class SessionSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of sessions created for this environment. + # @!attribute [r] active + # @return [::Boolean] + # Output only. Queries over sessions to mark whether the environment is + # currently active or not + class SessionStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # URI Endpoints to access sessions associated with the Environment. + # @!attribute [r] notebooks + # @return [::String] + # Output only. URI to serve notebook APIs + # @!attribute [r] sql + # @return [::String] + # Output only. URI to serve SQL APIs + class Endpoints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Content represents a user-visible notebook or a sql script + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the content, of the form: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [rw] path + # @return [::String] + # Required. The path for the Content file, represented as directory + # structure. Unique within a lake. Limited to alphanumerics, hyphens, + # underscores, dots and slashes. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Content creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the content was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined labels for the content. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the content. + # @!attribute [rw] data_text + # @return [::String] + # Required. Content data in string format. + # @!attribute [rw] sql_script + # @return [::Google::Cloud::Dataplex::V1::Content::SqlScript] + # Sql Script related configurations. + # @!attribute [rw] notebook + # @return [::Google::Cloud::Dataplex::V1::Content::Notebook] + # Notebook related configurations. + class Content + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for the Sql Script content. + # @!attribute [rw] engine + # @return [::Google::Cloud::Dataplex::V1::Content::SqlScript::QueryEngine] + # Required. Query Engine to be used for the Sql Query. + class SqlScript + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Query Engine Type of the SQL Script. + module QueryEngine + # Value was unspecified. + QUERY_ENGINE_UNSPECIFIED = 0 + + # Spark SQL Query. + SPARK = 2 + end + end + + # Configuration for Notebook content. + # @!attribute [rw] kernel_type + # @return [::Google::Cloud::Dataplex::V1::Content::Notebook::KernelType] + # Required. Kernel Type of the notebook. + class Notebook + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Kernel Type of the Jupyter notebook. + module KernelType + # Kernel Type unspecified. + KERNEL_TYPE_UNSPECIFIED = 0 + + # Python 3 Kernel. + PYTHON3 = 1 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents an active analyze session running for a user. + # @!attribute [r] name + # @return [::String] + # 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} + # @!attribute [r] user_id + # @return [::String] + # Output only. Email of user running the session. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Session start time. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. State of Session + class Session + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb new file mode 100644 index 000000000000..aca578b5e853 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb @@ -0,0 +1,1092 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # Aspect Type is a template for creating Aspects, and represents the + # JSON-schema for a given Entry, e.g., BigQuery Table Schema. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the AspectType, of the form: + # projects/\\{project_number}/locations/\\{location_id}/aspectTypes/\\{aspect_type_id}. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the AspectType was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the AspectType was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the AspectType. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the AspectType. + # @!attribute [rw] etag + # @return [::String] + # 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. + # @!attribute [rw] authorization + # @return [::Google::Cloud::Dataplex::V1::AspectType::Authorization] + # Immutable. Authorization defined for this type. + # @!attribute [rw] metadata_template + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] + # Required. MetadataTemplate of the aspect. + # @!attribute [r] transfer_status + # @return [::Google::Cloud::Dataplex::V1::TransferStatus] + # Output only. Denotes the transfer status of the Aspect Type. It is + # unspecified for Aspect Types created from Dataplex API. + class AspectType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Autorization for an Aspect Type. + # @!attribute [rw] alternate_use_permission + # @return [::String] + # 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. + class Authorization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MetadataTemplate definition for AspectType + # @!attribute [rw] index + # @return [::Integer] + # 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. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the field. + # @!attribute [rw] type + # @return [::String] + # 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). + # @!attribute [rw] record_fields + # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate>] + # Optional. Field definition, needs to be specified if the type is record. + # Defines the nested fields. + # @!attribute [rw] enum_values + # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::EnumValue>] + # Optional. The list of values for an enum type. Needs to be defined if the + # type is enum. + # @!attribute [rw] map_items + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] + # 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 + # MetadataTemplate. The recommended value for the name field is item, as + # this is not used in the actual payload. + # @!attribute [rw] array_items + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] + # 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. + # @!attribute [rw] type_id + # @return [::String] + # 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. + # @!attribute [rw] type_ref + # @return [::String] + # Optional. A reference to another field definition (instead of 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 + # refer to other fields. + # @!attribute [rw] constraints + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::Constraints] + # Optional. Specifies the constraints on this field. + # @!attribute [rw] annotations + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::Annotations] + # Optional. Specifies annotations on this field. + class MetadataTemplate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Definition of Enumvalue (to be used by enum fields) + # @!attribute [rw] index + # @return [::Integer] + # Required. Index for the enum. Cannot be modified. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the enumvalue. This is the actual value that the + # aspect will contain. + # @!attribute [rw] deprecated + # @return [::String] + # Optional. Optional deprecation message to be set if an enum value needs + # to be deprecated. + class EnumValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Definition of the constraints of a field + # @!attribute [rw] required + # @return [::Boolean] + # Optional. Marks this as an optional/required field. + class Constraints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Definition of the annotations of a field + # @!attribute [rw] deprecated + # @return [::String] + # Optional. Marks a field as deprecated, a deprecation message can be + # included. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Specify a displayname for a field. + # @!attribute [rw] description + # @return [::String] + # Optional. Specify a description for a field + # @!attribute [rw] display_order + # @return [::Integer] + # Optional. Specify a display order for a field. Display order can be + # used to reorder where a field is rendered + # @!attribute [rw] string_type + # @return [::String] + # 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. + # @!attribute [rw] string_values + # @return [::Array<::String>] + # Optional. Suggested hints for string fields. These can be used to + # suggest values to users, through an UI for example. + class Annotations + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An Entry Group represents a logical grouping of one or more Entries. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the EntryGroup, of the form: + # projects/\\{project_number}/locations/\\{location_id}/entryGroups/\\{entry_group_id}. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the EntryGroup was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the EntryGroup was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the EntryGroup. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the EntryGroup. + # @!attribute [rw] etag + # @return [::String] + # 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. + # @!attribute [r] transfer_status + # @return [::Google::Cloud::Dataplex::V1::TransferStatus] + # Output only. Denotes the transfer status of the Entry Group. It is + # unspecified for Entry Group created from Dataplex API. + class EntryGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Entry Type is a template for creating Entries. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the EntryType, of the form: + # projects/\\{project_number}/locations/\\{location_id}/entryTypes/\\{entry_type_id}. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the EntryType was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the EntryType was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the EntryType. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the EntryType. + # @!attribute [rw] etag + # @return [::String] + # 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. + # @!attribute [rw] type_aliases + # @return [::Array<::String>] + # Optional. Indicates the class this Entry Type belongs to, for example, + # TABLE, DATABASE, MODEL. + # @!attribute [rw] platform + # @return [::String] + # Optional. The platform that Entries of this type belongs to. + # @!attribute [rw] system + # @return [::String] + # Optional. The system that Entries of this type belongs to. Examples include + # CloudSQL, MariaDB etc + # @!attribute [rw] required_aspects + # @return [::Array<::Google::Cloud::Dataplex::V1::EntryType::AspectInfo>] + # AspectInfo for the entry type. + # @!attribute [rw] authorization + # @return [::Google::Cloud::Dataplex::V1::EntryType::Authorization] + # Immutable. Authorization defined for this type. + class EntryType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] type + # @return [::String] + # Required aspect type for the entry type. + class AspectInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Authorization for an Entry Type. + # @!attribute [rw] alternate_use_permission + # @return [::String] + # 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. + class Authorization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An aspect is a single piece of metadata describing an entry. + # @!attribute [r] aspect_type + # @return [::String] + # Output only. The resource name of the type used to create this Aspect. + # @!attribute [r] path + # @return [::String] + # Output only. The path in the entry under which the aspect is attached. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Aspect was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Aspect was last updated. + # @!attribute [rw] data + # @return [::Google::Protobuf::Struct] + # 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). + # @!attribute [rw] aspect_source + # @return [::Google::Cloud::Dataplex::V1::AspectSource] + class Aspect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AspectSource contains source system related information for the + # aspect. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The create time of the aspect in the source system. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The update time of the aspect in the source system. + class AspectSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An entry is a representation of a data asset which can be described by + # various metadata. + # @!attribute [rw] name + # @return [::String] + # Identifier. The relative resource name of the Entry, of the form: + # projects/\\{project}/locations/\\{location}/entryGroups/\\{entry_group}/entries/\\{entry}. + # @!attribute [rw] entry_type + # @return [::String] + # Required. Immutable. The resource name of the EntryType used to create this + # Entry. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Entry was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Entry was last updated. + # @!attribute [rw] aspects + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Dataplex::V1::Aspect}] + # 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) + # @!attribute [rw] parent_entry + # @return [::String] + # Optional. Immutable. The resource name of the parent entry. + # @!attribute [rw] fully_qualified_name + # @return [::String] + # Optional. A name for the entry that can reference it in an external system. + # The maximum size of the field is 4000 characters. + # @!attribute [rw] entry_source + # @return [::Google::Cloud::Dataplex::V1::EntrySource] + # Optional. Source system related information for an entry. + class Entry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Dataplex::V1::Aspect] + class AspectsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # EntrySource contains source system related information for the + # entry. + # @!attribute [rw] resource + # @return [::String] + # The name of the resource in the source system. + # The maximum size of the field is 4000 characters. + # @!attribute [rw] system + # @return [::String] + # The name of the source system. + # The maximum size of the field is 64 characters. + # @!attribute [rw] platform + # @return [::String] + # The platform containing the source system. + # The maximum size of the field is 64 characters. + # @!attribute [rw] display_name + # @return [::String] + # User friendly display name. + # The maximum size of the field is 500 characters. + # @!attribute [rw] description + # @return [::String] + # Description of the Entry. + # The maximum size of the field is 2000 characters. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # User-defined labels. + # The maximum size of keys and values is 128 characters each. + # @!attribute [rw] ancestors + # @return [::Array<::Google::Cloud::Dataplex::V1::EntrySource::Ancestor>] + # Immutable. The ancestors of the Entry in the source system. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The create time of the resource in the source system. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The update time of the resource in the source system. + class EntrySource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Ancestor contains information about individual items in the hierarchy of + # an Entry. + # @!attribute [rw] name + # @return [::String] + # Optional. The name of the ancestor resource. + # @!attribute [rw] type + # @return [::String] + # Optional. The type of the ancestor resource. + class Ancestor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Create EntryGroup Request + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the entryGroup, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a GCP region. + # @!attribute [rw] entry_group_id + # @return [::String] + # Required. EntryGroup identifier. + # @!attribute [rw] entry_group + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # Required. EntryGroup Resource + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateEntryGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update EntryGroup Request + # @!attribute [rw] entry_group + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # Required. EntryGroup Resource + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateEntryGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delele EntryGroup Request + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryGroupRequest method returns an ABORTED error response + class DeleteEntryGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List entryGroups request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListEntryGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List ListEntryGroups response. + # @!attribute [rw] entry_groups + # @return [::Array<::Google::Cloud::Dataplex::V1::EntryGroup>] + # ListEntryGroups under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListEntryGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get EntryGroup request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + class GetEntryGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create EntryType Request + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the EntryType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a GCP region. + # @!attribute [rw] entry_type_id + # @return [::String] + # Required. EntryType identifier. + # @!attribute [rw] entry_type + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # Required. EntryType Resource + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateEntryTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update EntryType Request + # @!attribute [rw] entry_type + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # Required. EntryType Resource + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateEntryTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delele EntryType Request + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryTypeRequest method returns an ABORTED error response + class DeleteEntryTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List EntryTypes request + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + class ListEntryTypesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List EntryTypes response + # @!attribute [rw] entry_types + # @return [::Array<::Google::Cloud::Dataplex::V1::EntryType>] + # ListEntryTypes under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListEntryTypesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get EntryType request + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + class GetEntryTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create AspectType Request + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the AspectType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a GCP region. + # @!attribute [rw] aspect_type_id + # @return [::String] + # Required. AspectType identifier. + # @!attribute [rw] aspect_type + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # Required. AspectType Resource + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateAspectTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update AspectType Request + # @!attribute [rw] aspect_type + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # Required. AspectType Resource + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateAspectTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delele AspectType Request + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteAspectTypeRequest method returns an ABORTED error response + class DeleteAspectTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List AspectTypes request + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + class ListAspectTypesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List AspectTypes response + # @!attribute [rw] aspect_types + # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType>] + # ListAspectTypes under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListAspectTypesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get AspectType request + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + class GetAspectTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @!attribute [rw] entry_id + # @return [::String] + # 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 + # `//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 + # Cloud. + # + # The maximum size of the field is 4000 characters. + # @!attribute [rw] entry + # @return [::Google::Cloud::Dataplex::V1::Entry] + # Required. Entry resource. + class CreateEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] entry + # @return [::Google::Cloud::Dataplex::V1::Entry] + # Required. Entry resource. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # 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. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true and the entry does not exist, it will be created. + # @!attribute [rw] delete_missing_aspects + # @return [::Boolean] + # 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. + # @!attribute [rw] aspect_keys + # @return [::Array<::String>] + # 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 + # `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. + class UpdateEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + class DeleteEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @!attribute [rw] page_size + # @return [::Integer] + # @!attribute [rw] page_token + # @return [::String] + # Optional. The pagination token returned by a previous request. + # @!attribute [rw] filter + # @return [::String] + # 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" + class ListEntriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] entries + # @return [::Array<::Google::Cloud::Dataplex::V1::Entry>] + # The list of entries. + # @!attribute [rw] next_page_token + # @return [::String] + # Pagination token. + class ListEntriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View for controlling which parts of an entry are to be returned. + # @!attribute [rw] aspect_types + # @return [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # Only works if the CUSTOM view is selected. + # @!attribute [rw] paths + # @return [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. Only works if the CUSTOM view is selected. + class GetEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/{location}`. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View for controlling which parts of an entry are to be returned. + # @!attribute [rw] aspect_types + # @return [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # Only works if the CUSTOM view is selected. + # @!attribute [rw] paths + # @return [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. Only works if the CUSTOM view is selected. + # @!attribute [rw] entry + # @return [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + class LookupEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/{location}`. + # @!attribute [rw] query + # @return [::String] + # Required. The query against which entries in scope should be matched. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Pagination. + # @!attribute [rw] page_token + # @return [::String] + # @!attribute [rw] order_by + # @return [::String] + # Optional. Ordering of the results. Supported options to be added later. + # @!attribute [rw] scope + # @return [::String] + # 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. + class SearchEntriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single result of a SearchEntries request. + # @!attribute [rw] linked_resource + # @return [::String] + # Linked resource name. + # @!attribute [rw] dataplex_entry + # @return [::Google::Cloud::Dataplex::V1::Entry] + # Entry format of the result. + # @!attribute [rw] snippets + # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResult::Snippets] + # Snippets. + class SearchEntriesResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Snippets for the entry, contains HTML-style highlighting for + # matched tokens, will be used in UI. + # @!attribute [rw] dataplex_entry + # @return [::Google::Cloud::Dataplex::V1::Entry] + # Entry + class Snippets + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] + # The results matching the search query. + # @!attribute [rw] total_size + # @return [::Integer] + # The estimated total number of matching entries. Not guaranteed to be + # accurate. + # @!attribute [rw] next_page_token + # @return [::String] + # Pagination token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable locations. Search results don't include data from those + # locations. + class SearchEntriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # View for controlling which parts of an entry are to be returned. + module 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 would exceed 100, the first 100 will be returned. + CUSTOM = 3 + + # Returns all aspects. If the number of aspects would exceed 100, the first + # 100 will be returned. + ALL = 4 + end + + # Denotes the transfer status of a resource. It is unspecified for resources + # created from Dataplex API. + module 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 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb new file mode 100644 index 000000000000..9fdc543e77b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # Create content request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} + # @!attribute [rw] content + # @return [::Google::Cloud::Dataplex::V1::Content] + # Required. Content resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateContentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update content request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] content + # @return [::Google::Cloud::Dataplex::V1::Content] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateContentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete content request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the content: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + class DeleteContentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List content request. Returns the BASIC Content view. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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. + class ListContentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List content response. + # @!attribute [rw] content + # @return [::Array<::Google::Cloud::Dataplex::V1::Content>] + # Content under the given parent lake. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListContentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get content request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the content: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView] + # Optional. Specify content view to make a partial request. + class GetContentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies whether the request should return the full or the partial + # representation. + module 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 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb new file mode 100644 index 000000000000..51cdbb703b14 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb @@ -0,0 +1,321 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # DataProfileScan related setting. + # @!attribute [rw] sampling_percent + # @return [::Float] + # 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. + # @!attribute [rw] row_filter + # @return [::String] + # 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 + # @!attribute [rw] post_scan_actions + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::PostScanActions] + # Optional. Actions to take upon job completion.. + # @!attribute [rw] include_fields + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::SelectedFields] + # 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`. + # @!attribute [rw] exclude_fields + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::SelectedFields] + # Optional. The fields to exclude from data profile. + # + # If specified, the fields will be excluded from data profile, regardless of + # `include_fields` value. + class DataProfileSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration of post scan actions of DataProfileScan job. + # @!attribute [rw] bigquery_export + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::PostScanActions::BigQueryExport] + # Optional. If set, results will be exported to the provided BigQuery + # table. + class PostScanActions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration of BigQuery export post scan action. + # @!attribute [rw] results_table + # @return [::String] + # Optional. The BigQuery table to export DataProfileScan results to. + # Format: + # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + class BigQueryExport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The specification for fields to include or exclude in data profile scan. + # @!attribute [rw] field_names + # @return [::Array<::String>] + # 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'. + class SelectedFields + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # DataProfileResult defines the output of DataProfileScan. Each field of the + # table will have field type specific profile result. + # @!attribute [rw] row_count + # @return [::Integer] + # The count of rows scanned. + # @!attribute [rw] profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile] + # The profile information per field. + # @!attribute [rw] scanned_data + # @return [::Google::Cloud::Dataplex::V1::ScannedData] + # The data scanned for this result. + # @!attribute [r] post_scan_actions_result + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult] + # Output only. The result of post scan actions. + class DataProfileResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains name, type, mode and field type specific profile information. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field>] + # List of fields with structural and profile information for each field. + class Profile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A field within a table. + # @!attribute [rw] name + # @return [::String] + # The name of the field. + # @!attribute [rw] type + # @return [::String] + # 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). + # @!attribute [rw] mode + # @return [::String] + # 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. + # @!attribute [rw] profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo] + # Profile information for the corresponding field. + class Field + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The profile information for each field type. + # @!attribute [rw] null_ratio + # @return [::Float] + # Ratio of rows with null value against total scanned rows. + # @!attribute [rw] distinct_ratio + # @return [::Float] + # Ratio of rows with distinct values against total scanned rows. + # Not available for complex non-groupable field type RECORD and fields + # with REPEATABLE mode. + # @!attribute [rw] top_n_values + # @return [::Array<::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::TopNValue>] + # 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. + # @!attribute [rw] string_profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::StringFieldInfo] + # String type field information. + # @!attribute [rw] integer_profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::IntegerFieldInfo] + # Integer type field information. + # @!attribute [rw] double_profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::DoubleFieldInfo] + # Double type field information. + class ProfileInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The profile information for a string type field. + # @!attribute [rw] min_length + # @return [::Integer] + # Minimum length of non-null values in the scanned data. + # @!attribute [rw] max_length + # @return [::Integer] + # Maximum length of non-null values in the scanned data. + # @!attribute [rw] average_length + # @return [::Float] + # Average length of non-null values in the scanned data. + class StringFieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The profile information for an integer type field. + # @!attribute [rw] average + # @return [::Float] + # Average of non-null values in the scanned data. NaN, if the field + # has a NaN. + # @!attribute [rw] standard_deviation + # @return [::Float] + # Standard deviation of non-null values in the scanned data. NaN, if + # the field has a NaN. + # @!attribute [rw] min + # @return [::Integer] + # Minimum of non-null values in the scanned data. NaN, if the field + # has a NaN. + # @!attribute [rw] quartiles + # @return [::Array<::Integer>] + # 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. + # @!attribute [rw] max + # @return [::Integer] + # Maximum of non-null values in the scanned data. NaN, if the field + # has a NaN. + class IntegerFieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The profile information for a double type field. + # @!attribute [rw] average + # @return [::Float] + # Average of non-null values in the scanned data. NaN, if the field + # has a NaN. + # @!attribute [rw] standard_deviation + # @return [::Float] + # Standard deviation of non-null values in the scanned data. NaN, if + # the field has a NaN. + # @!attribute [rw] min + # @return [::Float] + # Minimum of non-null values in the scanned data. NaN, if the field + # has a NaN. + # @!attribute [rw] quartiles + # @return [::Array<::Float>] + # 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. + # @!attribute [rw] max + # @return [::Float] + # Maximum of non-null values in the scanned data. NaN, if the field + # has a NaN. + class DoubleFieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Top N non-null values in the scanned data. + # @!attribute [rw] value + # @return [::String] + # String value of a top N non-null value. + # @!attribute [rw] count + # @return [::Integer] + # Count of the corresponding value in the scanned data. + # @!attribute [rw] ratio + # @return [::Float] + # Ratio of the corresponding value in the field against the total + # number of rows in the scanned data. + class TopNValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + + # The result of post scan actions of DataProfileScan job. + # @!attribute [r] bigquery_export_result + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult::BigQueryExportResult] + # Output only. The result of BigQuery export post scan action. + class PostScanActionsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of BigQuery export post scan action. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult::BigQueryExportResult::State] + # Output only. Execution state for the BigQuery exporting. + # @!attribute [r] message + # @return [::String] + # Output only. Additional information about the BigQuery exporting. + class BigQueryExportResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution state for the exporting. + module 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 + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb new file mode 100644 index 000000000000..ee7c3444912d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb @@ -0,0 +1,540 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # DataQualityScan related setting. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRule>] + # Required. The list of rules to evaluate against a data source. At least one + # rule is required. + # @!attribute [rw] sampling_percent + # @return [::Float] + # 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. + # @!attribute [rw] row_filter + # @return [::String] + # 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 + # @!attribute [rw] post_scan_actions + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions] + # Optional. Actions to take upon job completion. + class DataQualitySpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration of post scan actions of DataQualityScan. + # @!attribute [rw] bigquery_export + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::BigQueryExport] + # Optional. If set, results will be exported to the provided BigQuery + # table. + # @!attribute [rw] notification_report + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::NotificationReport] + # Optional. If set, results will be sent to the provided notification + # receipts upon triggers. + class PostScanActions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration of BigQuery export post scan action. + # @!attribute [rw] results_table + # @return [::String] + # Optional. The BigQuery table to export DataQualityScan results to. + # Format: + # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + class BigQueryExport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The individuals or groups who are designated to receive notifications + # upon triggers. + # @!attribute [rw] emails + # @return [::Array<::String>] + # Optional. The email recipients who will receive the DataQualityScan + # results report. + class Recipients + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This trigger is triggered when the DQ score in the job result is less + # than a specified input score. + # @!attribute [rw] score_threshold + # @return [::Float] + # Optional. The score range is in [0,100]. + class ScoreThresholdTrigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This trigger is triggered when the scan job itself fails, regardless of + # the result. + class JobFailureTrigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This trigger is triggered whenever a scan job run ends, regardless + # of the result. + class JobEndTrigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration of notification report post scan action. + # @!attribute [rw] recipients + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::Recipients] + # Required. The recipients who will receive the notification report. + # @!attribute [rw] score_threshold_trigger + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::ScoreThresholdTrigger] + # Optional. If set, report will be sent when score threshold is met. + # @!attribute [rw] job_failure_trigger + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::JobFailureTrigger] + # Optional. If set, report will be sent when a scan job fails. + # @!attribute [rw] job_end_trigger + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::JobEndTrigger] + # Optional. If set, report will be sent when a scan job ends. + class NotificationReport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # The output of a DataQualityScan. + # @!attribute [rw] passed + # @return [::Boolean] + # Overall data quality result -- `true` if all rules passed. + # @!attribute [r] score + # @return [::Float] + # Output only. The overall data quality score. + # + # The score ranges between [0, 100] (up to two decimal points). + # @!attribute [rw] dimensions + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityDimensionResult>] + # 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. + # @!attribute [r] columns + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityColumnResult>] + # 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. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRuleResult>] + # A list of all the rules in a job, and their results. + # @!attribute [rw] row_count + # @return [::Integer] + # The count of rows processed. + # @!attribute [rw] scanned_data + # @return [::Google::Cloud::Dataplex::V1::ScannedData] + # The data scanned for this result. + # @!attribute [r] post_scan_actions_result + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult] + # Output only. The result of post scan actions. + class DataQualityResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of post scan actions of DataQualityScan job. + # @!attribute [r] bigquery_export_result + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult::BigQueryExportResult] + # Output only. The result of BigQuery export post scan action. + class PostScanActionsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of BigQuery export post scan action. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult::BigQueryExportResult::State] + # Output only. Execution state for the BigQuery exporting. + # @!attribute [r] message + # @return [::String] + # Output only. Additional information about the BigQuery exporting. + class BigQueryExportResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution state for the exporting. + module 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 + end + end + end + end + + # DataQualityRuleResult provides a more detailed, per-rule view of the results. + # @!attribute [rw] rule + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule] + # The rule specified in the DataQualitySpec, as is. + # @!attribute [rw] passed + # @return [::Boolean] + # Whether the rule passed or failed. + # @!attribute [rw] evaluated_count + # @return [::Integer] + # 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`. + # @!attribute [rw] passed_count + # @return [::Integer] + # The number of rows which passed a rule evaluation. + # + # This field is only valid for row-level type rules. + # @!attribute [rw] null_count + # @return [::Integer] + # The number of rows with null values in the specified column. + # @!attribute [rw] pass_ratio + # @return [::Float] + # The ratio of **passed_count / evaluated_count**. + # + # This field is only valid for row-level type rules. + # @!attribute [rw] failing_rows_query + # @return [::String] + # The query to find rows that did not pass this rule. + # + # This field is only valid for row-level type rules. + # @!attribute [r] assertion_row_count + # @return [::Integer] + # Output only. The number of rows returned by the sql statement in the + # SqlAssertion rule. + # + # This field is only valid for SqlAssertion rules. + class DataQualityRuleResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataQualityDimensionResult provides a more detailed, per-dimension view of + # the results. + # @!attribute [r] dimension + # @return [::Google::Cloud::Dataplex::V1::DataQualityDimension] + # Output only. The dimension config specified in the DataQualitySpec, as is. + # @!attribute [rw] passed + # @return [::Boolean] + # Whether the dimension passed or failed. + # @!attribute [r] score + # @return [::Float] + # 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). + class DataQualityDimensionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A dimension captures data quality intent about a defined subset of the rules + # specified. + # @!attribute [rw] name + # @return [::String] + # The dimension name a rule belongs to. Supported dimensions are + # ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", + # "INTEGRITY"] + class DataQualityDimension + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A rule captures data quality intent about a data source. + # @!attribute [rw] range_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RangeExpectation] + # Row-level rule which evaluates whether each column value lies between a + # specified range. + # @!attribute [rw] non_null_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::NonNullExpectation] + # Row-level rule which evaluates whether each column value is null. + # @!attribute [rw] set_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::SetExpectation] + # Row-level rule which evaluates whether each column value is contained by + # a specified set. + # @!attribute [rw] regex_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RegexExpectation] + # Row-level rule which evaluates whether each column value matches a + # specified regex. + # @!attribute [rw] uniqueness_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::UniquenessExpectation] + # Row-level rule which evaluates whether each column value is unique. + # @!attribute [rw] statistic_range_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation] + # Aggregate rule which evaluates whether the column aggregate + # statistic lies between a specified range. + # @!attribute [rw] row_condition_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RowConditionExpectation] + # Row-level rule which evaluates whether each row in a table passes the + # specified condition. + # @!attribute [rw] table_condition_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation] + # Aggregate rule which evaluates whether the provided expression is true + # for a table. + # @!attribute [rw] sql_assertion + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion] + # Aggregate rule which evaluates the number of rows returned for the + # provided statement. + # @!attribute [rw] column + # @return [::String] + # Optional. The unnested column which this rule is evaluated against. + # @!attribute [rw] ignore_null + # @return [::Boolean] + # 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 + # @!attribute [rw] dimension + # @return [::String] + # Required. The dimension a rule belongs to. Results are also aggregated at + # the dimension level. Supported dimensions are **["COMPLETENESS", + # "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** + # @!attribute [rw] threshold + # @return [::Float] + # 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. + # @!attribute [rw] name + # @return [::String] + # 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. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the rule. + # + # * The maximum length is 1,024 characters. + class DataQualityRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Evaluates whether each column value lies between a specified range. + # @!attribute [rw] min_value + # @return [::String] + # 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. + # @!attribute [rw] max_value + # @return [::String] + # 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. + # @!attribute [rw] strict_min_enabled + # @return [::Boolean] + # 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. + # @!attribute [rw] strict_max_enabled + # @return [::Boolean] + # 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. + class RangeExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether each column value is null. + class NonNullExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether each column value is contained by a specified set. + # @!attribute [rw] values + # @return [::Array<::String>] + # Optional. Expected values for the column value. + class SetExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether each column value matches a specified regex. + # @!attribute [rw] regex + # @return [::String] + # Optional. A regular expression the column value is expected to match. + class RegexExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether the column has duplicates. + class UniquenessExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether the column aggregate statistic lies between a specified + # range. + # @!attribute [rw] statistic + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic] + # Optional. The aggregate metric to evaluate. + # @!attribute [rw] min_value + # @return [::String] + # 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. + # @!attribute [rw] max_value + # @return [::String] + # 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. + # @!attribute [rw] strict_min_enabled + # @return [::Boolean] + # 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. + # @!attribute [rw] strict_max_enabled + # @return [::Boolean] + # 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. + class StatisticRangeExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of aggregate metrics a rule can be evaluated against. + module 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 + end + end + + # 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 + # @!attribute [rw] sql_expression + # @return [::String] + # Optional. The SQL expression. + class RowConditionExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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 + # @!attribute [rw] sql_expression + # @return [::String] + # Optional. The SQL expression. + class TableConditionExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Queries for rows returned by the provided SQL statement. If any rows are + # are returned, this rule fails. + # + # The SQL statement needs to use BigQuery standard SQL syntax, and must not + # contain any semicolons. + # + # $\\{data()} can be used to reference the rows being evaluated, i.e. the table + # after all additional filters (row filters, incremental data filters, + # sampling) are applied. + # + # Example: SELECT * FROM $\\{data()} WHERE price < 0 + # @!attribute [rw] sql_statement + # @return [::String] + # Optional. The SQL statement. + class SqlAssertion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # DataQualityColumnResult provides a more detailed, per-column view of + # the results. + # @!attribute [r] column + # @return [::String] + # Output only. The column specified in the DataQualityRule. + # @!attribute [r] score + # @return [::Float] + # 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). + class DataQualityColumnResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb new file mode 100644 index 000000000000..072f86b2fcd8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb @@ -0,0 +1,565 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # 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. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the DataTaxonomy, of the form: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id}. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataTaxonomy was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataTaxonomy was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the DataTaxonomy. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the DataTaxonomy. + # @!attribute [r] attribute_count + # @return [::Integer] + # Output only. The number of attributes in the DataTaxonomy. + # @!attribute [rw] etag + # @return [::String] + # 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. + # @!attribute [r] class_count + # @return [::Integer] + # Output only. The number of classes in the DataTaxonomy. + class DataTaxonomy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # 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 + # ``` + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the dataAttribute, of the form: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id}. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataAttribute was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataAttribute was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the DataAttribute. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the DataAttribute. + # @!attribute [rw] parent_id + # @return [::String] + # 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] + # @!attribute [r] attribute_count + # @return [::Integer] + # Output only. The number of child attributes present for this attribute. + # @!attribute [rw] etag + # @return [::String] + # 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. + # @!attribute [rw] resource_access_spec + # @return [::Google::Cloud::Dataplex::V1::ResourceAccessSpec] + # Optional. Specified when applied to a resource (eg: Cloud Storage bucket, + # BigQuery dataset, BigQuery table). + # @!attribute [rw] data_access_spec + # @return [::Google::Cloud::Dataplex::V1::DataAccessSpec] + # Optional. Specified when applied to data stored on the resource (eg: rows, + # columns in BigQuery Tables). + class DataAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # DataAttributeBinding represents binding of attributes to resources. Eg: Bind + # 'CustomerInfo' entity with 'PII' attribute. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the Data Attribute Binding, of + # the form: + # projects/\\{project_number}/locations/\\{location}/dataAttributeBindings/\\{data_attribute_binding_id} + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataAttributeBinding was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataAttributeBinding was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the DataAttributeBinding. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the DataAttributeBinding. + # @!attribute [rw] etag + # @return [::String] + # 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. + # @!attribute [rw] resource + # @return [::String] + # 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. + # @!attribute [rw] attributes + # @return [::Array<::String>] + # Optional. List of attributes to be associated with the resource, provided + # in the form: + # projects/\\{project}/locations/\\{location}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @!attribute [rw] paths + # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttributeBinding::Path>] + # Optional. The list of paths for items within the associated resource (eg. + # columns and partitions within a table) along with attribute bindings. + class DataAttributeBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a subresource of the given resource, and associated bindings + # with it. Currently supported subresources are column and partition schema + # fields within a table. + # @!attribute [rw] name + # @return [::String] + # Required. The name identifier of the path. + # Nested columns should be of the form: 'address.city'. + # @!attribute [rw] attributes + # @return [::Array<::String>] + # 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} + class Path + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Create DataTaxonomy request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] data_taxonomy_id + # @return [::String] + # 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. + # @!attribute [rw] data_taxonomy + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # Required. DataTaxonomy resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateDataTaxonomyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update DataTaxonomy request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] data_taxonomy + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # Required. Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateDataTaxonomyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get DataTaxonomy request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + class GetDataTaxonomyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataTaxonomies request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListDataTaxonomiesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataTaxonomies response. + # @!attribute [rw] data_taxonomies + # @return [::Array<::Google::Cloud::Dataplex::V1::DataTaxonomy>] + # DataTaxonomies under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataTaxonomiesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete DataTaxonomy request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value,the DeleteDataTaxonomy method returns an ABORTED error. + class DeleteDataTaxonomyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create DataAttribute request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @!attribute [rw] data_attribute_id + # @return [::String] + # 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. + # @!attribute [rw] data_attribute + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # Required. DataAttribute resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateDataAttributeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update DataAttribute request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] data_attribute + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # Required. Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateDataAttributeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get DataAttribute request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + class GetDataAttributeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataAttributes request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListDataAttributesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataAttributes response. + # @!attribute [rw] data_attributes + # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttribute>] + # DataAttributes under the given parent DataTaxonomy. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataAttributesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete DataAttribute request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteDataAttribute method returns an ABORTED error response. + class DeleteDataAttributeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create DataAttributeBinding request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id} + # @!attribute [rw] data_attribute_binding_id + # @return [::String] + # 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. + # @!attribute [rw] data_attribute_binding + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # Required. DataAttributeBinding resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateDataAttributeBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update DataAttributeBinding request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] data_attribute_binding + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # Required. Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateDataAttributeBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get DataAttributeBinding request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + class GetDataAttributeBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataAttributeBindings request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the Location: + # projects/\\{project_number}/locations/\\{location_id} + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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" + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListDataAttributeBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataAttributeBindings response. + # @!attribute [rw] data_attribute_bindings + # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] + # DataAttributeBindings under the given parent Location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataAttributeBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete DataAttributeBinding request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # @!attribute [rw] etag + # @return [::String] + # 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. + class DeleteDataAttributeBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb new file mode 100644 index 000000000000..866900dcba0c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb @@ -0,0 +1,474 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # Create dataScan request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] data_scan + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # Required. DataScan resource. + # @!attribute [rw] data_scan_id + # @return [::String] + # 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. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + class CreateDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update dataScan request. + # @!attribute [rw] data_scan + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # Required. DataScan resource to be updated. + # + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + class UpdateDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete dataScan request. + # @!attribute [rw] name + # @return [::String] + # 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. + class DeleteDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get dataScan request. + # @!attribute [rw] name + # @return [::String] + # 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. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] + # Optional. Select the DataScan view to return. Defaults to `BASIC`. + class GetDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # DataScan view options. + module 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 + end + end + + # List dataScans request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + class ListDataScansRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List dataScans response. + # @!attribute [rw] data_scans + # @return [::Array<::Google::Cloud::Dataplex::V1::DataScan>] + # DataScans (`BASIC` view only) under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataScansResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Run DataScan Request + # @!attribute [rw] name + # @return [::String] + # 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. + class RunDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Run DataScan Response. + # @!attribute [rw] job + # @return [::Google::Cloud::Dataplex::V1::DataScanJob] + # DataScanJob created by RunDataScan request. + class RunDataScanResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get DataScanJob request. + # @!attribute [rw] name + # @return [::String] + # 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. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] + # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + class GetDataScanJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # DataScanJob view options. + module 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 + end + end + + # List DataScanJobs request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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. + class ListDataScanJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataScanJobs response. + # @!attribute [rw] data_scan_jobs + # @return [::Array<::Google::Cloud::Dataplex::V1::DataScanJob>] + # DataScanJobs (`BASIC` view only) under a given dataScan. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListDataScanJobsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Generate recommended DataQualityRules request. + # @!attribute [rw] name + # @return [::String] + # Required. The name should be either + # * the name of a datascan with at least one successful completed data + # profiling job, or + # * the name of a successful completed data profiling datascan job. + class GenerateDataQualityRulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Generate recommended DataQualityRules response. + # @!attribute [rw] rule + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRule>] + # Generated recommended \\{@link DataQualityRule}s. + class GenerateDataQualityRulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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). + # @!attribute [r] name + # @return [::String] + # 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. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the scan. + # + # * Must be between 1-1024 characters. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # + # * Must be between 1-256 characters. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the scan. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the DataScan. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the scan was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the scan was last updated. + # @!attribute [rw] data + # @return [::Google::Cloud::Dataplex::V1::DataSource] + # Required. The data source for DataScan. + # @!attribute [rw] execution_spec + # @return [::Google::Cloud::Dataplex::V1::DataScan::ExecutionSpec] + # Optional. DataScan execution settings. + # + # If not specified, the fields in it will use their default values. + # @!attribute [r] execution_status + # @return [::Google::Cloud::Dataplex::V1::DataScan::ExecutionStatus] + # Output only. Status of the data scan execution. + # @!attribute [r] type + # @return [::Google::Cloud::Dataplex::V1::DataScanType] + # Output only. The type of DataScan. + # @!attribute [rw] data_quality_spec + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec] + # DataQualityScan related setting. + # @!attribute [rw] data_profile_spec + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec] + # DataProfileScan related setting. + # @!attribute [r] data_quality_result + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult] + # Output only. The result of the data quality scan. + # @!attribute [r] data_profile_result + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult] + # Output only. The result of the data profile scan. + class DataScan + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # DataScan execution settings. + # @!attribute [rw] trigger + # @return [::Google::Cloud::Dataplex::V1::Trigger] + # 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. + # @!attribute [rw] field + # @return [::String] + # 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. + class ExecutionSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of the data scan execution. + # @!attribute [rw] latest_job_start_time + # @return [::Google::Protobuf::Timestamp] + # The time when the latest DataScanJob started. + # @!attribute [rw] latest_job_end_time + # @return [::Google::Protobuf::Timestamp] + # The time when the latest DataScanJob ended. + class ExecutionStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A DataScanJob represents an instance of DataScan execution. + # @!attribute [r] name + # @return [::String] + # 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. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the DataScanJob. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataScanJob was started. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataScanJob ended. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::DataScanJob::State] + # Output only. Execution state for the DataScanJob. + # @!attribute [r] message + # @return [::String] + # Output only. Additional information about the current state. + # @!attribute [r] type + # @return [::Google::Cloud::Dataplex::V1::DataScanType] + # Output only. The type of the parent DataScan. + # @!attribute [r] data_quality_spec + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec] + # Output only. DataQualityScan related setting. + # @!attribute [r] data_profile_spec + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec] + # Output only. DataProfileScan related setting. + # @!attribute [r] data_quality_result + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult] + # Output only. The result of the data quality scan. + # @!attribute [r] data_profile_result + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult] + # Output only. The result of the data profile scan. + class DataScanJob + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution state for the DataScanJob. + module 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 + end + end + + # The type of DataScan. + module DataScanType + # The DataScan type is unspecified. + DATA_SCAN_TYPE_UNSPECIFIED = 0 + + # Data Quality scan. + DATA_QUALITY = 1 + + # Data Profile scan. + DATA_PROFILE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb new file mode 100644 index 000000000000..87e2a85289cf --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb @@ -0,0 +1,814 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # The payload associated with Discovery data processing. + # @!attribute [rw] message + # @return [::String] + # The log message. + # @!attribute [rw] lake_id + # @return [::String] + # The id of the associated lake. + # @!attribute [rw] zone_id + # @return [::String] + # The id of the associated zone. + # @!attribute [rw] asset_id + # @return [::String] + # The id of the associated asset. + # @!attribute [rw] data_location + # @return [::String] + # The data location associated with the event. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EventType] + # The type of the event being logged. + # @!attribute [rw] config + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::ConfigDetails] + # Details about discovery configuration in effect. + # @!attribute [rw] entity + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityDetails] + # Details about the entity associated with the event. + # @!attribute [rw] partition + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::PartitionDetails] + # Details about the partition associated with the event. + # @!attribute [rw] action + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::ActionDetails] + # Details about the action associated with the event. + class DiscoveryEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Details about configuration events. + # @!attribute [rw] parameters + # @return [::Google::Protobuf::Map{::String => ::String}] + # A list of discovery configuration parameters in effect. + # The keys are the field paths within DiscoverySpec. + # Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, + # etc. + class ConfigDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParametersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Details about the entity. + # @!attribute [rw] entity + # @return [::String] + # The name of the entity resource. + # The name is the fully-qualified resource name. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityType] + # The type of the entity resource. + class EntityDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about the partition. + # @!attribute [rw] partition + # @return [::String] + # The name to the partition resource. + # The name is the fully-qualified resource name. + # @!attribute [rw] entity + # @return [::String] + # The name to the containing entity resource. + # The name is the fully-qualified resource name. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityType] + # The type of the containing entity resource. + # @!attribute [rw] sampled_data_locations + # @return [::Array<::String>] + # The locations of the data items (e.g., a Cloud Storage objects) sampled + # for metadata inference. + class PartitionDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about the action. + # @!attribute [rw] type + # @return [::String] + # The type of action. + # Eg. IncompatibleDataSchema, InvalidDataFormat + class ActionDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of the event. + module 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 + end + + # The type of the entity. + module EntityType + # An unspecified event type. + ENTITY_TYPE_UNSPECIFIED = 0 + + # Entities representing structured data. + TABLE = 1 + + # Entities representing unstructured data. + FILESET = 2 + end + end + + # The payload associated with Job logs that contains events describing jobs + # that have run within a Lake. + # @!attribute [rw] message + # @return [::String] + # The log message. + # @!attribute [rw] job_id + # @return [::String] + # The unique id identifying the job. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time when the job started running. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time when the job ended running. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::JobEvent::State] + # The job state on completion. + # @!attribute [rw] retries + # @return [::Integer] + # The number of retries. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::JobEvent::Type] + # The type of the job. + # @!attribute [rw] service + # @return [::Google::Cloud::Dataplex::V1::JobEvent::Service] + # The service used to execute the job. + # @!attribute [rw] service_job + # @return [::String] + # The reference to the job within the service. + # @!attribute [rw] execution_trigger + # @return [::Google::Cloud::Dataplex::V1::JobEvent::ExecutionTrigger] + # Job execution trigger. + class JobEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the job. + module Type + # Unspecified job type. + TYPE_UNSPECIFIED = 0 + + # Spark jobs. + SPARK = 1 + + # Notebook jobs. + NOTEBOOK = 2 + end + + # The completion status of the job. + module 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 + end + + # The service used to execute the job. + module Service + # Unspecified service. + SERVICE_UNSPECIFIED = 0 + + # Cloud Dataproc. + DATAPROC = 1 + end + + # Job Execution trigger. + module 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 + end + end + + # These messages contain information about sessions within an environment. + # The monitored resource is 'Environment'. + # @!attribute [rw] message + # @return [::String] + # The log message. + # @!attribute [rw] user_id + # @return [::String] + # The information about the user that created the session. It will be the + # email address of the user. + # @!attribute [rw] session_id + # @return [::String] + # Unique identifier for the session. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::SessionEvent::EventType] + # The type of the event. + # @!attribute [rw] query + # @return [::Google::Cloud::Dataplex::V1::SessionEvent::QueryDetail] + # The execution details of the query. + # @!attribute [rw] event_succeeded + # @return [::Boolean] + # The status of the event. + # @!attribute [rw] fast_startup_enabled + # @return [::Boolean] + # If the session is associated with an environment with fast startup enabled, + # and was created before being assigned to a user. + # @!attribute [rw] unassigned_duration + # @return [::Google::Protobuf::Duration] + # The idle duration of a warm pooled session before it is assigned to user. + class SessionEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution details of the query. + # @!attribute [rw] query_id + # @return [::String] + # The unique Query id identifying the query. + # @!attribute [rw] query_text + # @return [::String] + # The query text executed. + # @!attribute [rw] engine + # @return [::Google::Cloud::Dataplex::V1::SessionEvent::QueryDetail::Engine] + # Query Execution engine. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # Time taken for execution of the query. + # @!attribute [rw] result_size_bytes + # @return [::Integer] + # The size of results the query produced. + # @!attribute [rw] data_processed_bytes + # @return [::Integer] + # The data processed by the query. + class QueryDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Query Execution engine. + module 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 + end + end + + # The type of the event. + module 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 + end + end + + # Payload associated with Governance related log events. + # @!attribute [rw] message + # @return [::String] + # The log message. + # @!attribute [rw] event_type + # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::EventType] + # The type of the event. + # @!attribute [rw] entity + # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::Entity] + # Entity resource information if the log event is associated with a + # specific entity. + class GovernanceEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about Entity resource that the log event is associated with. + # @!attribute [rw] entity + # @return [::String] + # 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}` + # @!attribute [rw] entity_type + # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::Entity::EntityType] + # Type of entity. + class Entity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of entity. + module EntityType + # An unspecified Entity type. + ENTITY_TYPE_UNSPECIFIED = 0 + + # Table entity type. + TABLE = 1 + + # Fileset entity type. + FILESET = 2 + end + end + + # Type of governance log event. + module 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 + end + end + + # These messages contain information about the execution of a datascan. + # The monitored resource is 'DataScan' + # Next ID: 13 + # @!attribute [rw] data_source + # @return [::String] + # The data source of the data scan + # @!attribute [rw] job_id + # @return [::String] + # The identifier of the specific data scan job this log entry is for. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the data scan job was created. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time when the data scan job started to run. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time when the data scan job finished. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::ScanType] + # The type of the data scan. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::State] + # The status of the data scan job. + # @!attribute [rw] message + # @return [::String] + # The message describing the data scan job event. + # @!attribute [rw] spec_version + # @return [::String] + # A version identifier of the spec which was used to execute this job. + # @!attribute [rw] trigger + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::Trigger] + # The trigger type of the data scan job. + # @!attribute [rw] scope + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::Scope] + # The scope of the data scan (e.g. full, incremental). + # @!attribute [rw] data_profile + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataProfileResult] + # Data profile result for data profile type data scan. + # @!attribute [rw] data_quality + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataQualityResult] + # Data quality result for data quality type data scan. + # @!attribute [rw] data_profile_configs + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataProfileAppliedConfigs] + # Applied configs for data profile type data scan. + # @!attribute [rw] data_quality_configs + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataQualityAppliedConfigs] + # Applied configs for data quality type data scan. + # @!attribute [rw] post_scan_actions_result + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult] + # The result of post scan actions. + class DataScanEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Data profile result for data scan job. + # @!attribute [rw] row_count + # @return [::Integer] + # The count of rows processed in the data scan job. + class DataProfileResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Data quality result for data scan job. + # @!attribute [rw] row_count + # @return [::Integer] + # The count of rows processed in the data scan job. + # @!attribute [rw] passed + # @return [::Boolean] + # Whether the data quality result was `pass` or not. + # @!attribute [rw] dimension_passed + # @return [::Google::Protobuf::Map{::String => ::Boolean}] + # 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. + # @!attribute [rw] score + # @return [::Float] + # The table-level data quality score for the data scan job. + # + # The data quality score ranges between [0, 100] (up to two decimal + # points). + # @!attribute [rw] dimension_score + # @return [::Google::Protobuf::Map{::String => ::Float}] + # 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). + # @!attribute [rw] column_score + # @return [::Google::Protobuf::Map{::String => ::Float}] + # 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). + class DataQualityResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Boolean] + class DimensionPassedEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Float] + class DimensionScoreEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Float] + class ColumnScoreEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Applied configs for data profile type data scan job. + # @!attribute [rw] sampling_percent + # @return [::Float] + # 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. + # @!attribute [rw] row_filter_applied + # @return [::Boolean] + # Boolean indicating whether a row filter was applied in the DataScan job. + # @!attribute [rw] column_filter_applied + # @return [::Boolean] + # Boolean indicating whether a column filter was applied in the DataScan + # job. + class DataProfileAppliedConfigs + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Applied configs for data quality type data scan job. + # @!attribute [rw] sampling_percent + # @return [::Float] + # 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. + # @!attribute [rw] row_filter_applied + # @return [::Boolean] + # Boolean indicating whether a row filter was applied in the DataScan job. + class DataQualityAppliedConfigs + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Post scan actions result for data scan job. + # @!attribute [rw] bigquery_export_result + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult::BigQueryExportResult] + # The result of BigQuery export post scan action. + class PostScanActionsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of BigQuery export post scan action. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult::BigQueryExportResult::State] + # Execution state for the BigQuery exporting. + # @!attribute [rw] message + # @return [::String] + # Additional information about the BigQuery exporting. + class BigQueryExportResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution state for the exporting. + module 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 + end + end + end + + # The type of the data scan. + module 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 + end + + # The job state of the data scan. + module 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 + end + + # The trigger type for the data scan. + module Trigger + # An unspecified trigger type. + TRIGGER_UNSPECIFIED = 0 + + # Data scan triggers on demand. + ON_DEMAND = 1 + + # Data scan triggers as per schedule. + SCHEDULE = 2 + end + + # The scope of job for the data scan. + module 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 + end + end + + # Information about the result of a data quality rule for data quality scan. + # The monitored resource is 'DataScan'. + # @!attribute [rw] job_id + # @return [::String] + # Identifier of the specific data scan job this log entry is for. + # @!attribute [rw] data_source + # @return [::String] + # The data source of the data scan (e.g. BigQuery table name). + # @!attribute [rw] column + # @return [::String] + # The column which this rule is evaluated against. + # @!attribute [rw] rule_name + # @return [::String] + # The name of the data quality rule. + # @!attribute [rw] rule_type + # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::RuleType] + # The type of the data quality rule. + # @!attribute [rw] evalution_type + # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::EvaluationType] + # The evaluation type of the data quality rule. + # @!attribute [rw] rule_dimension + # @return [::String] + # The dimension of the data quality rule. + # @!attribute [rw] threshold_percent + # @return [::Float] + # The passing threshold ([0.0, 100.0]) of the data quality rule. + # @!attribute [rw] result + # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::Result] + # The result of the data quality rule. + # @!attribute [rw] evaluated_row_count + # @return [::Integer] + # The number of rows evaluated against the data quality rule. + # This field is only valid for rules of PER_ROW evaluation type. + # @!attribute [rw] passed_row_count + # @return [::Integer] + # The number of rows which passed a rule evaluation. + # This field is only valid for rules of PER_ROW evaluation type. + # @!attribute [rw] null_row_count + # @return [::Integer] + # The number of rows with null values in the specified column. + # @!attribute [rw] assertion_row_count + # @return [::Integer] + # The number of rows returned by the sql statement in the SqlAssertion rule. + # This field is only valid for SqlAssertion rules. + class DataQualityScanRuleResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the data quality rule. + module RuleType + # An unspecified rule type. + RULE_TYPE_UNSPECIFIED = 0 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#nonnullexpectation. + NON_NULL_EXPECTATION = 1 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rangeexpectation. + RANGE_EXPECTATION = 2 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#regexexpectation. + REGEX_EXPECTATION = 3 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rowconditionexpectation. + ROW_CONDITION_EXPECTATION = 4 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#setexpectation. + SET_EXPECTATION = 5 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#statisticrangeexpectation. + STATISTIC_RANGE_EXPECTATION = 6 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#tableconditionexpectation. + TABLE_CONDITION_EXPECTATION = 7 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#uniquenessexpectation. + UNIQUENESS_EXPECTATION = 8 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#sqlAssertion. + SQL_ASSERTION = 9 + end + + # The evaluation type of the data quality rule. + module 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 + end + + # Whether the data quality rule passed or failed. + module Result + # An unspecified result. + RESULT_UNSPECIFIED = 0 + + # The data quality rule passed. + PASSED = 1 + + # The data quality rule failed. + FAILED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb new file mode 100644 index 000000000000..53866289671e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb @@ -0,0 +1,733 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # Create a metadata entity request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] entity + # @return [::Google::Cloud::Dataplex::V1::Entity] + # Required. Entity resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateEntityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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. + # @!attribute [rw] entity + # @return [::Google::Cloud::Dataplex::V1::Entity] + # Required. Update description. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateEntityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete a metadata entity request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @!attribute [rw] etag + # @return [::String] + # Required. The etag associated with the entity, which can be retrieved with + # a [GetEntity][] request. + class DeleteEntityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List metadata entities request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] + # Required. Specify the entity view to make a partial list request. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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" + class ListEntitiesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Entity views. + module 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 + end + end + + # List metadata entities response. + # @!attribute [rw] entities + # @return [::Array<::Google::Cloud::Dataplex::V1::Entity>] + # Entities in the specified parent zone. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # remaining results in the list. + class ListEntitiesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get metadata entity request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] + # Optional. Used to select the subset of entity information to return. + # Defaults to `BASIC`. + class GetEntityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Entity views for get entity partial result. + module 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 + end + end + + # List metadata partitions request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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. + class ListPartitionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create metadata partition request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @!attribute [rw] partition + # @return [::Google::Cloud::Dataplex::V1::Partition] + # Required. Partition resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreatePartitionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete metadata partition request. + # @!attribute [rw] name + # @return [::String] + # 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. + # @!attribute [rw] etag + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. The etag associated with the partition. + class DeletePartitionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List metadata partitions response. + # @!attribute [rw] partitions + # @return [::Array<::Google::Cloud::Dataplex::V1::Partition>] + # Partitions under the specified parent entity. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # remaining results in the list. + class ListPartitionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get metadata partition request. + # @!attribute [rw] name + # @return [::String] + # 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. + class GetPartitionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents tables and fileset metadata contained within a zone. + # @!attribute [r] name + # @return [::String] + # 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}`. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Display name must be shorter than or equal to 256 characters. + # @!attribute [rw] description + # @return [::String] + # Optional. User friendly longer description text. Must be shorter than or + # equal to 1024 characters. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the entity was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the entity was last updated. + # @!attribute [rw] id + # @return [::String] + # 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. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag associated with the entity, which can be retrieved with + # a [GetEntity][] request. Required for update and delete requests. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Entity::Type] + # Required. Immutable. The type of entity. + # @!attribute [rw] asset + # @return [::String] + # 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. + # @!attribute [rw] data_path + # @return [::String] + # 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`. + # @!attribute [rw] data_path_pattern + # @return [::String] + # 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`. + # @!attribute [r] catalog_entry + # @return [::String] + # Output only. The name of the associated Data Catalog entry. + # @!attribute [rw] system + # @return [::Google::Cloud::Dataplex::V1::StorageSystem] + # Required. Immutable. Identifies the storage system of the entity data. + # @!attribute [rw] format + # @return [::Google::Cloud::Dataplex::V1::StorageFormat] + # Required. Identifies the storage format of the entity data. + # It does not apply to entities with data stored in BigQuery. + # @!attribute [r] compatibility + # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus] + # Output only. Metadata stores that the entity is compatible with. + # @!attribute [r] access + # @return [::Google::Cloud::Dataplex::V1::StorageAccess] + # Output only. Identifies the access mechanism to the entity. Not user + # settable. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [rw] schema + # @return [::Google::Cloud::Dataplex::V1::Schema] + # 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. + class Entity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Provides compatibility information for various metadata stores. + # @!attribute [r] hive_metastore + # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus::Compatibility] + # Output only. Whether this entity is compatible with Hive Metastore. + # @!attribute [r] bigquery + # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus::Compatibility] + # Output only. Whether this entity is compatible with BigQuery. + class CompatibilityStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Provides compatibility information for a specific metadata store. + # @!attribute [r] compatible + # @return [::Boolean] + # Output only. Whether the entity is compatible and can be represented in + # the metadata store. + # @!attribute [r] reason + # @return [::String] + # Output only. Provides additional detail if the entity is incompatible + # with the metadata store. + class Compatibility + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The type of entity. + module Type + # Type unspecified. + TYPE_UNSPECIFIED = 0 + + # Structured and semi-structured data. + TABLE = 1 + + # Unstructured data. + FILESET = 2 + end + end + + # Represents partition metadata contained within entity instances. + # @!attribute [r] name + # @return [::String] + # 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. + # @!attribute [rw] values + # @return [::Array<::String>] + # Required. Immutable. The set of values representing the partition, which + # correspond to the partition schema defined in the parent entity. + # @!attribute [rw] location + # @return [::String] + # 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/` + # @!attribute [rw] etag + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. The etag for this partition. + class Partition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Schema information describing the structure and layout of the data. + # @!attribute [rw] user_managed + # @return [::Boolean] + # 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. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>] + # Optional. The sequence of fields describing data in table entities. + # **Note:** BigQuery SchemaFields are immutable. + # @!attribute [rw] partition_fields + # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::PartitionField>] + # Optional. The sequence of fields describing the partition structure in + # entities. If this field is empty, there are no partitions within the data. + # @!attribute [rw] partition_style + # @return [::Google::Cloud::Dataplex::V1::Schema::PartitionStyle] + # Optional. The structure of paths containing partition data within the + # entity. + class Schema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a column field within a table schema. + # @!attribute [rw] name + # @return [::String] + # 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. + # @!attribute [rw] description + # @return [::String] + # Optional. User friendly field description. Must be less than or equal to + # 1024 characters. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Schema::Type] + # Required. The type of field. + # @!attribute [rw] mode + # @return [::Google::Cloud::Dataplex::V1::Schema::Mode] + # Required. Additional field semantics. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>] + # Optional. Any nested field for complex types. + class SchemaField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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. + # @!attribute [rw] name + # @return [::String] + # 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.. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Schema::Type] + # Required. Immutable. The type of field. + class PartitionField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Type information for fields in schemas and partition schemas. + module 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 + end + + # Additional qualifiers to define field semantics. + module 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 + end + + # The structure of paths within the entity, which represent partitions. + module 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 + end + end + + # Describes the format of the data within its storage location. + # @!attribute [r] format + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::Format] + # Output only. The data format associated with the stored data, which + # represents content type values. The value is inferred from mime type. + # @!attribute [rw] compression_format + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::CompressionFormat] + # Optional. The compression type associated with the stored data. + # If unspecified, the data is uncompressed. + # @!attribute [rw] mime_type + # @return [::String] + # 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} + # @!attribute [rw] csv + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::CsvOptions] + # Optional. Additional information about CSV formatted data. + # @!attribute [rw] json + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::JsonOptions] + # Optional. Additional information about CSV formatted data. + # @!attribute [rw] iceberg + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::IcebergOptions] + # Optional. Additional information about iceberg tables. + class StorageFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes CSV and similar semi-structured data formats. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. Accepts "US-ASCII", + # "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. + # @!attribute [rw] header_rows + # @return [::Integer] + # Optional. The number of rows to interpret as header rows that should be + # skipped when reading data rows. Defaults to 0. + # @!attribute [rw] delimiter + # @return [::String] + # Optional. The delimiter used to separate values. Defaults to ','. + # @!attribute [rw] quote + # @return [::String] + # Optional. The character used to quote column values. Accepts '"' + # (double quotation mark) or ''' (single quotation mark). Defaults to + # '"' (double quotation mark) if unspecified. + class CsvOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes JSON data format. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" + # and "ISO-8859-1". Defaults to UTF-8 if not specified. + class JsonOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes Iceberg data format. + # @!attribute [rw] metadata_location + # @return [::String] + # Optional. The location of where the iceberg metadata is present, must be + # within the table path + class IcebergOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The specific file format of the data. + module 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 + end + + # The specific compressed file format of the data. + module CompressionFormat + # CompressionFormat unspecified. Implies uncompressed data. + COMPRESSION_FORMAT_UNSPECIFIED = 0 + + # GZip compressed set of files. + GZIP = 2 + + # BZip2 compressed set of files. + BZIP2 = 3 + end + end + + # Describes the access mechanism of the data within its storage location. + # @!attribute [r] read + # @return [::Google::Cloud::Dataplex::V1::StorageAccess::AccessMode] + # Output only. Describes the read access mechanism of the data. Not user + # settable. + class StorageAccess + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Access Mode determines how data stored within the Entity is read. + module 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 + end + end + + # Identifies the cloud system that manages the data storage. + module 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 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb new file mode 100644 index 000000000000..5ca2d5c43e57 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb @@ -0,0 +1,106 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # DataScan scheduling and trigger settings. + # @!attribute [rw] on_demand + # @return [::Google::Cloud::Dataplex::V1::Trigger::OnDemand] + # The scan runs once via `RunDataScan` API. + # @!attribute [rw] schedule + # @return [::Google::Cloud::Dataplex::V1::Trigger::Schedule] + # The scan is scheduled to run periodically. + class Trigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The scan runs once via `RunDataScan` API. + class OnDemand + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The scan is scheduled to run periodically. + # @!attribute [rw] cron + # @return [::String] + # 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. + class Schedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The data source for DataScan. + # @!attribute [rw] entity + # @return [::String] + # 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}`. + # @!attribute [rw] resource + # @return [::String] + # 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 + class DataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data scanned during processing (e.g. in incremental DataScan) + # @!attribute [rw] incremental_field + # @return [::Google::Cloud::Dataplex::V1::ScannedData::IncrementalField] + # The range denoted by values of an incremental field + class ScannedData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A data range denoted by a pair of start/end values of a field. + # @!attribute [rw] field + # @return [::String] + # The field that contains values which monotonically increases over time + # (e.g. a timestamp column). + # @!attribute [rw] start + # @return [::String] + # Value that marks the start of the range. + # @!attribute [rw] end + # @return [::String] + # Value that marks the end of the range. + class IncrementalField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb new file mode 100644 index 000000000000..c60ba4fca1b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb @@ -0,0 +1,838 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module 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. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the lake, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the lake was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the lake was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the lake. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the lake. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the lake. + # @!attribute [r] service_account + # @return [::String] + # Output only. Service account associated with this lake. This service + # account must be authorized to access or operate on resources managed by the + # lake. + # @!attribute [rw] metastore + # @return [::Google::Cloud::Dataplex::V1::Lake::Metastore] + # Optional. Settings to manage lake and Dataproc Metastore service instance + # association. + # @!attribute [r] asset_status + # @return [::Google::Cloud::Dataplex::V1::AssetStatus] + # Output only. Aggregated status of the underlying assets of the lake. + # @!attribute [r] metastore_status + # @return [::Google::Cloud::Dataplex::V1::Lake::MetastoreStatus] + # Output only. Metastore status of the lake. + class Lake + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings to manage association of Dataproc Metastore with a lake. + # @!attribute [rw] service + # @return [::String] + # 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}` + class Metastore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of Lake and Dataproc Metastore service instance association. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::Lake::MetastoreStatus::State] + # Current state of association. + # @!attribute [rw] message + # @return [::String] + # Additional information about the current status. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the metastore status of the lake. + # @!attribute [rw] endpoint + # @return [::String] + # The URI of the endpoint used to access the Metastore service. + class MetastoreStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Current state of association. + module 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 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Aggregated status of the underlying assets of a lake or zone. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the status. + # @!attribute [rw] active_assets + # @return [::Integer] + # Number of active assets. + # @!attribute [rw] security_policy_applying_assets + # @return [::Integer] + # Number of assets that are in process of updating the security policy on + # attached resources. + class AssetStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the zone, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the zone was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the zone was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined labels for the zone. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the zone. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the zone. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Zone::Type] + # Required. Immutable. The type of the zone. + # @!attribute [rw] discovery_spec + # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec] + # Optional. Specification of the discovery feature applied to data in this + # zone. + # @!attribute [rw] resource_spec + # @return [::Google::Cloud::Dataplex::V1::Zone::ResourceSpec] + # Required. Specification of the resources that are referenced by the assets + # within this zone. + # @!attribute [r] asset_status + # @return [::Google::Cloud::Dataplex::V1::AssetStatus] + # Output only. Aggregated status of the underlying assets of the zone. + class Zone + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings for resources attached as assets within a zone. + # @!attribute [rw] location_type + # @return [::Google::Cloud::Dataplex::V1::Zone::ResourceSpec::LocationType] + # Required. Immutable. The location type of the resources that are allowed + # to be attached to the assets within this zone. + class ResourceSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Location type of the resources attached to a zone. + module 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 + end + end + + # Settings to manage the metadata discovery and publishing in a zone. + # @!attribute [rw] enabled + # @return [::Boolean] + # Required. Whether discovery is enabled. + # @!attribute [rw] include_patterns + # @return [::Array<::String>] + # 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. + # @!attribute [rw] exclude_patterns + # @return [::Array<::String>] + # 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. + # @!attribute [rw] csv_options + # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec::CsvOptions] + # Optional. Configuration for CSV data. + # @!attribute [rw] json_options + # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec::JsonOptions] + # Optional. Configuration for Json data. + # @!attribute [rw] schedule + # @return [::String] + # 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 * * * *`. + class DiscoverySpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describe CSV and similar semi-structured data formats. + # @!attribute [rw] header_rows + # @return [::Integer] + # Optional. The number of rows to interpret as header rows that should be + # skipped when reading data rows. + # @!attribute [rw] delimiter + # @return [::String] + # Optional. The delimiter being used to separate values. This defaults to + # ','. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. The default is UTF-8. + # @!attribute [rw] disable_type_inference + # @return [::Boolean] + # Optional. Whether to disable the inference of data type for CSV data. + # If true, all columns will be registered as strings. + class CsvOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describe JSON data format. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. The default is UTF-8. + # @!attribute [rw] disable_type_inference + # @return [::Boolean] + # 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). + class JsonOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Type of zone. + module 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 + end + end + + # Action represents an issue requiring administrator action for resolution. + # @!attribute [rw] category + # @return [::Google::Cloud::Dataplex::V1::Action::Category] + # The category of issue associated with the action. + # @!attribute [rw] issue + # @return [::String] + # Detailed description of the issue requiring action. + # @!attribute [rw] detect_time + # @return [::Google::Protobuf::Timestamp] + # The time that the issue was detected. + # @!attribute [r] name + # @return [::String] + # 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}`. + # @!attribute [r] lake + # @return [::String] + # Output only. The relative resource name of the lake, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [r] zone + # @return [::String] + # Output only. The relative resource name of the zone, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [r] asset + # @return [::String] + # 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}`. + # @!attribute [rw] data_locations + # @return [::Array<::String>] + # 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`). + # @!attribute [rw] invalid_data_format + # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataFormat] + # Details for issues related to invalid or unsupported data formats. + # @!attribute [rw] incompatible_data_schema + # @return [::Google::Cloud::Dataplex::V1::Action::IncompatibleDataSchema] + # Details for issues related to incompatible schemas detected within data. + # @!attribute [rw] invalid_data_partition + # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataPartition] + # Details for issues related to invalid or unsupported data partition + # structure. + # @!attribute [rw] missing_data + # @return [::Google::Cloud::Dataplex::V1::Action::MissingData] + # Details for issues related to absence of data within managed resources. + # @!attribute [rw] missing_resource + # @return [::Google::Cloud::Dataplex::V1::Action::MissingResource] + # Details for issues related to absence of a managed resource. + # @!attribute [rw] unauthorized_resource + # @return [::Google::Cloud::Dataplex::V1::Action::UnauthorizedResource] + # Details for issues related to lack of permissions to access data + # resources. + # @!attribute [rw] failed_security_policy_apply + # @return [::Google::Cloud::Dataplex::V1::Action::FailedSecurityPolicyApply] + # Details for issues related to applying security policy. + # @!attribute [rw] invalid_data_organization + # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataOrganization] + # Details for issues related to invalid data arrangement. + class Action + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Action details for resource references in assets that cannot be located. + class MissingResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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. + class UnauthorizedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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. + # @!attribute [rw] asset + # @return [::String] + # Resource name of one of the assets with failing security policy + # application. Populated for a lake or zone resource only. + class FailedSecurityPolicyApply + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Action details for invalid or unsupported data files detected by discovery. + # @!attribute [rw] sampled_data_locations + # @return [::Array<::String>] + # The list of data locations sampled and used for format/schema + # inference. + # @!attribute [rw] expected_format + # @return [::String] + # The expected data format of the entity. + # @!attribute [rw] new_format + # @return [::String] + # The new unexpected data format within the entity. + class InvalidDataFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Action details for incompatible schemas detected by discovery. + # @!attribute [rw] table + # @return [::String] + # The name of the table containing invalid data. + # @!attribute [rw] existing_schema + # @return [::String] + # The existing and expected schema of the table. The schema is provided as + # a JSON formatted structure listing columns and data types. + # @!attribute [rw] new_schema + # @return [::String] + # The new and incompatible schema within the table. The schema is provided + # as a JSON formatted structured listing columns and data types. + # @!attribute [rw] sampled_data_locations + # @return [::Array<::String>] + # The list of data locations sampled and used for format/schema + # inference. + # @!attribute [rw] schema_change + # @return [::Google::Cloud::Dataplex::V1::Action::IncompatibleDataSchema::SchemaChange] + # Whether the action relates to a schema that is incompatible or modified. + class IncompatibleDataSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Whether the action relates to a schema that is incompatible or modified. + module 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 + end + end + + # Action details for invalid or unsupported partitions detected by discovery. + # @!attribute [rw] expected_structure + # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataPartition::PartitionStructure] + # The issue type of InvalidDataPartition. + class InvalidDataPartition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The expected partition structure. + module 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 + end + end + + # Action details for absence of data detected by discovery. + class MissingData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Action details for invalid data arrangement. + class InvalidDataOrganization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The category of issues. + module 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 + end + end + + # An asset represents a cloud resource that is being managed within a lake as a + # member of a zone. + # @!attribute [r] name + # @return [::String] + # 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}`. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the asset was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the asset was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined labels for the asset. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the asset. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the asset. + # @!attribute [rw] resource_spec + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec] + # Required. Specification of the resource that is referenced by this asset. + # @!attribute [r] resource_status + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceStatus] + # Output only. Status of the resource referenced by this asset. + # @!attribute [r] security_status + # @return [::Google::Cloud::Dataplex::V1::Asset::SecurityStatus] + # Output only. Status of the security policy applied to resource referenced + # by this asset. + # @!attribute [rw] discovery_spec + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec] + # 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. + # @!attribute [r] discovery_status + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus] + # Output only. Status of the discovery feature applied to data referenced by + # this asset. + class Asset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Security policy status of the asset. Data security policy, i.e., readers, + # writers & owners, should be specified in the lake/zone/asset IAM policy. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::Asset::SecurityStatus::State] + # The current state of the security policy applied to the attached + # resource. + # @!attribute [rw] message + # @return [::String] + # Additional information about the current state. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the status. + class SecurityStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the security policy. + module 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 + end + end + + # Settings to manage the metadata discovery and publishing for an asset. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Whether discovery is enabled. + # @!attribute [rw] include_patterns + # @return [::Array<::String>] + # 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. + # @!attribute [rw] exclude_patterns + # @return [::Array<::String>] + # 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. + # @!attribute [rw] csv_options + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec::CsvOptions] + # Optional. Configuration for CSV data. + # @!attribute [rw] json_options + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec::JsonOptions] + # Optional. Configuration for Json data. + # @!attribute [rw] schedule + # @return [::String] + # 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 * * * *`. + class DiscoverySpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describe CSV and similar semi-structured data formats. + # @!attribute [rw] header_rows + # @return [::Integer] + # Optional. The number of rows to interpret as header rows that should be + # skipped when reading data rows. + # @!attribute [rw] delimiter + # @return [::String] + # Optional. The delimiter being used to separate values. This defaults to + # ','. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. The default is UTF-8. + # @!attribute [rw] disable_type_inference + # @return [::Boolean] + # Optional. Whether to disable the inference of data type for CSV data. + # If true, all columns will be registered as strings. + class CsvOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describe JSON data format. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. The default is UTF-8. + # @!attribute [rw] disable_type_inference + # @return [::Boolean] + # 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). + class JsonOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Identifies the cloud resource that is referenced by this asset. + # @!attribute [rw] name + # @return [::String] + # 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}` + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec::Type] + # Required. Immutable. Type of resource. + # @!attribute [rw] read_access_mode + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec::AccessMode] + # Optional. Determines how read permissions are handled for each asset and + # their associated tables. Only available to storage buckets assets. + class ResourceSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of resource. + module Type + # Type not specified. + TYPE_UNSPECIFIED = 0 + + # Cloud Storage bucket. + STORAGE_BUCKET = 1 + + # BigQuery dataset. + BIGQUERY_DATASET = 2 + end + + # Access Mode determines how data stored within the resource is read. This + # is only applicable to storage bucket assets. + module 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 + end + end + + # Status of the resource referenced by an asset. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceStatus::State] + # The current state of the managed resource. + # @!attribute [rw] message + # @return [::String] + # Additional information about the current state. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the status. + # @!attribute [r] managed_access_identity + # @return [::String] + # Output only. Service account associated with the BigQuery Connection. + class ResourceStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of a resource. + module State + # State unspecified. + STATE_UNSPECIFIED = 0 + + # Resource does not have any errors. + READY = 1 + + # Resource has errors. + ERROR = 2 + end + end + + # Status of discovery for an asset. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus::State] + # The current status of the discovery feature. + # @!attribute [rw] message + # @return [::String] + # Additional information about the current state. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the status. + # @!attribute [rw] last_run_time + # @return [::Google::Protobuf::Timestamp] + # The start time of the last discovery run. + # @!attribute [rw] stats + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus::Stats] + # Data Stats of the asset reported by discovery. + # @!attribute [rw] last_run_duration + # @return [::Google::Protobuf::Duration] + # The duration of the last discovery run. + class DiscoveryStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The aggregated data statistics for the asset reported by discovery. + # @!attribute [rw] data_items + # @return [::Integer] + # The count of data items within the referenced resource. + # @!attribute [rw] data_size + # @return [::Integer] + # The number of stored data bytes within the referenced resource. + # @!attribute [rw] tables + # @return [::Integer] + # The count of table entities within the referenced resource. + # @!attribute [rw] filesets + # @return [::Integer] + # The count of fileset entities within the referenced resource. + class Stats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Current state of discovery. + module 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 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # State of a resource. + module 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 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb new file mode 100644 index 000000000000..4a900722e1cc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # ResourceAccessSpec holds the access control configuration to be enforced + # on the resources, for example, Cloud Storage bucket, BigQuery dataset, + # BigQuery table. + # @!attribute [rw] readers + # @return [::Array<::String>] + # 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. + # @!attribute [rw] writers + # @return [::Array<::String>] + # Optional. The set of principals to be granted writer role on the resource. + # @!attribute [rw] owners + # @return [::Array<::String>] + # Optional. The set of principals to be granted owner role on the resource. + class ResourceAccessSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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. + # @!attribute [rw] readers + # @return [::Array<::String>] + # 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. + class DataAccessSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb new file mode 100644 index 000000000000..00b0c56e0f04 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb @@ -0,0 +1,803 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # Create lake request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] lake_id + # @return [::String] + # 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. + # @!attribute [rw] lake + # @return [::Google::Cloud::Dataplex::V1::Lake] + # Required. Lake resource + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateLakeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update lake request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] lake + # @return [::Google::Cloud::Dataplex::V1::Lake] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateLakeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete lake request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + class DeleteLakeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List lakes request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListLakesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List lakes response. + # @!attribute [rw] lakes + # @return [::Array<::Google::Cloud::Dataplex::V1::Lake>] + # Lakes under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListLakesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List lake actions request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + class ListLakeActionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List actions response. + # @!attribute [rw] actions + # @return [::Array<::Google::Cloud::Dataplex::V1::Action>] + # Actions under the given parent lake/zone/asset. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListActionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get lake request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + class GetLakeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create zone request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] zone_id + # @return [::String] + # 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") + # @!attribute [rw] zone + # @return [::Google::Cloud::Dataplex::V1::Zone] + # Required. Zone resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update zone request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] zone + # @return [::Google::Cloud::Dataplex::V1::Zone] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete zone request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + class DeleteZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List zones request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListZonesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List zones response. + # @!attribute [rw] zones + # @return [::Array<::Google::Cloud::Dataplex::V1::Zone>] + # Zones under the given parent lake. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListZonesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List zone actions request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + class ListZoneActionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get zone request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + class GetZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create asset request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] asset_id + # @return [::String] + # 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. + # @!attribute [rw] asset + # @return [::Google::Cloud::Dataplex::V1::Asset] + # Required. Asset resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update asset request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] asset + # @return [::Google::Cloud::Dataplex::V1::Asset] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete asset request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + class DeleteAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List assets request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List assets response. + # @!attribute [rw] assets + # @return [::Array<::Google::Cloud::Dataplex::V1::Asset>] + # Asset under the given parent zone. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List asset actions request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + class ListAssetActionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get asset request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + class GetAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of a long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # 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`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create task request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] task_id + # @return [::String] + # Required. Task identifier. + # @!attribute [rw] task + # @return [::Google::Cloud::Dataplex::V1::Task] + # Required. Task resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update task request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] task + # @return [::Google::Cloud::Dataplex::V1::Task] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete task request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + class DeleteTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List tasks request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListTasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List tasks response. + # @!attribute [rw] tasks + # @return [::Array<::Google::Cloud::Dataplex::V1::Task>] + # Tasks under the given parent lake. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListTasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get task request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + class GetTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get job request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + class GetJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # 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. + # @!attribute [rw] args + # @return [::Google::Protobuf::Map{::String => ::String}] + # 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. + class RunTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ArgsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] job + # @return [::Google::Cloud::Dataplex::V1::Job] + # Jobs created by RunTask API. + class RunTaskResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List jobs request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + class ListJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List jobs response. + # @!attribute [rw] jobs + # @return [::Array<::Google::Cloud::Dataplex::V1::Job>] + # Jobs under a given task. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListJobsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Cancel task jobs. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + class CancelJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create environment request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] environment_id + # @return [::String] + # 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. + # @!attribute [rw] environment + # @return [::Google::Cloud::Dataplex::V1::Environment] + # Required. Environment resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateEnvironmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update environment request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] environment + # @return [::Google::Cloud::Dataplex::V1::Environment] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateEnvironmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete environment request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the environment: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + class DeleteEnvironmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List environments request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListEnvironmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List environments response. + # @!attribute [rw] environments + # @return [::Array<::Google::Cloud::Dataplex::V1::Environment>] + # Environments under the given parent lake. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListEnvironmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get environment request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the environment: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + class GetEnvironmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List sessions request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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 + class ListSessionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List sessions response. + # @!attribute [rw] sessions + # @return [::Array<::Google::Cloud::Dataplex::V1::Session>] + # Sessions under a given environment. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListSessionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb new file mode 100644 index 000000000000..b18b15ea7b54 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb @@ -0,0 +1,435 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # A task represents a user-visible job. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the task, of the form: + # projects/\\{project_number}/locations/\\{location_id}/lakes/\\{lake_id}/ + # tasks/\\{task_id}. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the task was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the task was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the task. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the task. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the task. + # @!attribute [rw] trigger_spec + # @return [::Google::Cloud::Dataplex::V1::Task::TriggerSpec] + # Required. Spec related to how often and when a task should be triggered. + # @!attribute [rw] execution_spec + # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionSpec] + # Required. Spec related to how a task is executed. + # @!attribute [r] execution_status + # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionStatus] + # Output only. Status of the latest task executions. + # @!attribute [rw] spark + # @return [::Google::Cloud::Dataplex::V1::Task::SparkTaskConfig] + # Config related to running custom Spark tasks. + # @!attribute [rw] notebook + # @return [::Google::Cloud::Dataplex::V1::Task::NotebookTaskConfig] + # Config related to running scheduled Notebooks. + class Task + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for the underlying infrastructure used to run workloads. + # @!attribute [rw] batch + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::BatchComputeResources] + # Compute resources needed for a Task when using Dataproc Serverless. + # @!attribute [rw] container_image + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::ContainerImageRuntime] + # Container Image Runtime Configuration. + # @!attribute [rw] vpc_network + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::VpcNetwork] + # Vpc network. + class InfrastructureSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Batch compute resources associated with the task. + # @!attribute [rw] executors_count + # @return [::Integer] + # Optional. Total number of job executors. + # Executor Count should be between 2 and 100. [Default=2] + # @!attribute [rw] max_executors_count + # @return [::Integer] + # 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] + class BatchComputeResources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container Image Runtime Configuration used with Batch execution. + # @!attribute [rw] image + # @return [::String] + # Optional. Container image to use. + # @!attribute [rw] java_jars + # @return [::Array<::String>] + # 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 + # @!attribute [rw] python_packages + # @return [::Array<::String>] + # 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 + # @!attribute [rw] properties + # @return [::Google::Protobuf::Map{::String => ::String}] + # 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). + class ContainerImageRuntime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class PropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Cloud VPC Network used to run the infrastructure. + # @!attribute [rw] network + # @return [::String] + # Optional. The Cloud VPC network in which the job is run. By default, + # the Cloud VPC network named Default within the project is used. + # @!attribute [rw] sub_network + # @return [::String] + # Optional. The Cloud VPC sub-network in which the job is run. + # @!attribute [rw] network_tags + # @return [::Array<::String>] + # Optional. List of network tags to apply to the job. + class VpcNetwork + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Task scheduling and trigger settings. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Task::TriggerSpec::Type] + # Required. Immutable. Trigger type of the user-specified Task. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # 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. + # @!attribute [rw] disabled + # @return [::Boolean] + # Optional. Prevent the task from executing. + # This does not cancel already running tasks. It is intended to temporarily + # disable RECURRING tasks. + # @!attribute [rw] max_retries + # @return [::Integer] + # Optional. Number of retry attempts before aborting. + # Set to zero to never attempt to retry a failed task. + # @!attribute [rw] schedule + # @return [::String] + # 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. + class TriggerSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Determines how often and when the job will run. + module 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 + end + end + + # Execution related settings, like retry and service_account. + # @!attribute [rw] args + # @return [::Google::Protobuf::Map{::String => ::String}] + # 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. + # @!attribute [rw] service_account + # @return [::String] + # Required. Service account to use to execute a task. + # If not provided, the default Compute service account for the project is + # used. + # @!attribute [rw] project + # @return [::String] + # Optional. The project in which jobs are run. By default, the project + # containing the Lake is used. If a project is provided, the + # {::Google::Cloud::Dataplex::V1::Task::ExecutionSpec#service_account ExecutionSpec.service_account} + # must belong to this project. + # @!attribute [rw] max_job_execution_lifetime + # @return [::Google::Protobuf::Duration] + # Optional. The maximum duration after which the job execution is expired. + # @!attribute [rw] kms_key + # @return [::String] + # 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}`. + class ExecutionSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ArgsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # User-specified config for running a Spark task. + # @!attribute [rw] main_jar_file_uri + # @return [::String] + # 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`). + # @!attribute [rw] main_class + # @return [::String] + # 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`). + # @!attribute [rw] python_script_file + # @return [::String] + # 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`). + # @!attribute [rw] sql_script_file + # @return [::String] + # 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";`). + # @!attribute [rw] sql_script + # @return [::String] + # The query text. + # The execution args are used to declare a set of script variables + # (`set key="value";`). + # @!attribute [rw] file_uris + # @return [::Array<::String>] + # Optional. Cloud Storage URIs of files to be placed in the working + # directory of each executor. + # @!attribute [rw] archive_uris + # @return [::Array<::String>] + # 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. + # @!attribute [rw] infrastructure_spec + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec] + # Optional. Infrastructure specification for the execution. + class SparkTaskConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for running scheduled notebooks. + # @!attribute [rw] notebook + # @return [::String] + # 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`). + # @!attribute [rw] infrastructure_spec + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec] + # Optional. Infrastructure specification for the execution. + # @!attribute [rw] file_uris + # @return [::Array<::String>] + # Optional. Cloud Storage URIs of files to be placed in the working + # directory of each executor. + # @!attribute [rw] archive_uris + # @return [::Array<::String>] + # 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. + class NotebookTaskConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of the task execution (e.g. Jobs). + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update time of the status. + # @!attribute [r] latest_job + # @return [::Google::Cloud::Dataplex::V1::Job] + # Output only. latest job execution + class ExecutionStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A job represents an instance of a task. + # @!attribute [r] name + # @return [::String] + # 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}`. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the job. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the job was started. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the job ended. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::Job::State] + # Output only. Execution state for the job. + # @!attribute [r] retry_count + # @return [::Integer] + # Output only. The number of times the job has been retried (excluding the + # initial attempt). + # @!attribute [r] service + # @return [::Google::Cloud::Dataplex::V1::Job::Service] + # Output only. The underlying service running a job. + # @!attribute [r] service_job + # @return [::String] + # Output only. The full resource name for the job run under a particular + # service. + # @!attribute [r] message + # @return [::String] + # Output only. Additional information about the current state. + # @!attribute [r] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. User-defined labels for the task. + # @!attribute [r] trigger + # @return [::Google::Cloud::Dataplex::V1::Job::Trigger] + # Output only. Job execution trigger. + # @!attribute [r] execution_spec + # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionSpec] + # Output only. Spec related to how a task is executed. + class Job + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + module Service + # Service used to run the job is unspecified. + SERVICE_UNSPECIFIED = 0 + + # Dataproc service is used to run this job. + DATAPROC = 1 + end + + module 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 + end + + # Job execution trigger. + module 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 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..54b83fb82b7d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,164 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc LongRunningRecognize(LongRunningRecognizeRequest) + # returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "LongRunningRecognizeResponse" + # metadata_type: "LongRunningRecognizeMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..fb4d6862eac9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..b5731a824060 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..8c6b19d52e3d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..8e7abcf8f052 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..9e96368be9d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..4ac9c4801a3f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..09acc69b6125 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..41c8c3a565cc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile new file mode 100644 index 000000000000..886d5625e3df --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-dataplex-v1", path: "../" +else + gem "google-cloud-dataplex-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb new file mode 100644 index 000000000000..f36fc0933161 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_CreateAspectType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_aspect_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type. +# +def create_aspect_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new + + # Call the create_aspect_type method. + result = client.create_aspect_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_CreateAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb new file mode 100644 index 000000000000..3f4ccb2d81f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_CreateEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry. +# +def create_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new + + # Call the create_entry method. + result = client.create_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_CreateEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb new file mode 100644 index 000000000000..376349a60218 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_CreateEntryGroup_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_entry_group call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group. +# +def create_entry_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new + + # Call the create_entry_group method. + result = client.create_entry_group request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_CreateEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb new file mode 100644 index 000000000000..314b91f322c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_CreateEntryType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_entry_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type. +# +def create_entry_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new + + # Call the create_entry_type method. + result = client.create_entry_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_CreateEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb new file mode 100644 index 000000000000..362457b5a4b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_DeleteAspectType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_aspect_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type. +# +def delete_aspect_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new + + # Call the delete_aspect_type method. + result = client.delete_aspect_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_DeleteAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb new file mode 100644 index 000000000000..3d1fe413c62c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_DeleteEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry. +# +def delete_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new + + # Call the delete_entry method. + result = client.delete_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_DeleteEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb new file mode 100644 index 000000000000..7246b08a556c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_entry_group call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group. +# +def delete_entry_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new + + # Call the delete_entry_group method. + result = client.delete_entry_group request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb new file mode 100644 index 000000000000..794e94fe2f28 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_DeleteEntryType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_entry_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type. +# +def delete_entry_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new + + # Call the delete_entry_type method. + result = client.delete_entry_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_DeleteEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb new file mode 100644 index 000000000000..fd04921c117d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_GetAspectType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_aspect_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type. +# +def get_aspect_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new + + # Call the get_aspect_type method. + result = client.get_aspect_type request + + # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. + p result +end +# [END dataplex_v1_generated_CatalogService_GetAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb new file mode 100644 index 000000000000..c1abef4d1f90 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_GetEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry. +# +def get_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEntryRequest.new + + # Call the get_entry method. + result = client.get_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_GetEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb new file mode 100644 index 000000000000..6319704f7a07 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_GetEntryGroup_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_entry_group call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group. +# +def get_entry_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new + + # Call the get_entry_group method. + result = client.get_entry_group request + + # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. + p result +end +# [END dataplex_v1_generated_CatalogService_GetEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb new file mode 100644 index 000000000000..ffb3842dffa8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_GetEntryType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_entry_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type. +# +def get_entry_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new + + # Call the get_entry_type method. + result = client.get_entry_type request + + # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. + p result +end +# [END dataplex_v1_generated_CatalogService_GetEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb new file mode 100644 index 000000000000..8bd6fc13947e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_ListAspectTypes_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_aspect_types call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types. +# +def list_aspect_types + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new + + # Call the list_aspect_types method. + result = client.list_aspect_types request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. + p item + end +end +# [END dataplex_v1_generated_CatalogService_ListAspectTypes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb new file mode 100644 index 000000000000..831f4b59a1d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_ListEntries_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_entries call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries. +# +def list_entries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new + + # Call the list_entries method. + result = client.list_entries request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. + p item + end +end +# [END dataplex_v1_generated_CatalogService_ListEntries_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb new file mode 100644 index 000000000000..c43311632377 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_ListEntryGroups_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_entry_groups call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups. +# +def list_entry_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new + + # Call the list_entry_groups method. + result = client.list_entry_groups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. + p item + end +end +# [END dataplex_v1_generated_CatalogService_ListEntryGroups_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb new file mode 100644 index 000000000000..6864cb0191c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_ListEntryTypes_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_entry_types call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types. +# +def list_entry_types + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new + + # Call the list_entry_types method. + result = client.list_entry_types request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. + p item + end +end +# [END dataplex_v1_generated_CatalogService_ListEntryTypes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb new file mode 100644 index 000000000000..a0eb324209fa --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_LookupEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the lookup_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry. +# +def lookup_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new + + # Call the lookup_entry method. + result = client.lookup_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_LookupEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb new file mode 100644 index 000000000000..0cda02b0b5ae --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_SearchEntries_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the search_entries call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries. +# +def search_entries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new + + # Call the search_entries method. + result = client.search_entries request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. + p item + end +end +# [END dataplex_v1_generated_CatalogService_SearchEntries_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb new file mode 100644 index 000000000000..3bd635f8ae9f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_UpdateAspectType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_aspect_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type. +# +def update_aspect_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new + + # Call the update_aspect_type method. + result = client.update_aspect_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_UpdateAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb new file mode 100644 index 000000000000..38c35bdfb614 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_UpdateEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry. +# +def update_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new + + # Call the update_entry method. + result = client.update_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_UpdateEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb new file mode 100644 index 000000000000..14ebf2748edb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_entry_group call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group. +# +def update_entry_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new + + # Call the update_entry_group method. + result = client.update_entry_group request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb new file mode 100644 index 000000000000..6e84f438b832 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_UpdateEntryType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_entry_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type. +# +def update_entry_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new + + # Call the update_entry_type method. + result = client.update_entry_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_UpdateEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb new file mode 100644 index 000000000000..9b30f42a41ad --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_CreateContent_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_content call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#create_content. +# +def create_content + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateContentRequest.new + + # Call the create_content method. + result = client.create_content request + + # The returned object is of type Google::Cloud::Dataplex::V1::Content. + p result +end +# [END dataplex_v1_generated_ContentService_CreateContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb new file mode 100644 index 000000000000..2169aa8d6106 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_DeleteContent_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_content call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#delete_content. +# +def delete_content + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new + + # Call the delete_content method. + result = client.delete_content request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataplex_v1_generated_ContentService_DeleteContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb new file mode 100644 index 000000000000..45684231c227 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_GetContent_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_content call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#get_content. +# +def get_content + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetContentRequest.new + + # Call the get_content method. + result = client.get_content request + + # The returned object is of type Google::Cloud::Dataplex::V1::Content. + p result +end +# [END dataplex_v1_generated_ContentService_GetContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb new file mode 100644 index 000000000000..1b54efd1b16b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_GetIamPolicy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_iam_policy call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END dataplex_v1_generated_ContentService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb new file mode 100644 index 000000000000..180c52eb5d49 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_ListContent_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_content call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#list_content. +# +def list_content + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListContentRequest.new + + # Call the list_content method. + result = client.list_content request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Content. + p item + end +end +# [END dataplex_v1_generated_ContentService_ListContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb new file mode 100644 index 000000000000..fee701099ea8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_SetIamPolicy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the set_iam_policy call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END dataplex_v1_generated_ContentService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb new file mode 100644 index 000000000000..c6b913d91e9d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_TestIamPermissions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the test_iam_permissions call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END dataplex_v1_generated_ContentService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb new file mode 100644 index 000000000000..bc5ad4969c2a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_UpdateContent_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_content call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#update_content. +# +def update_content + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new + + # Call the update_content method. + result = client.update_content request + + # The returned object is of type Google::Cloud::Dataplex::V1::Content. + p result +end +# [END dataplex_v1_generated_ContentService_UpdateContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb new file mode 100644 index 000000000000..7ef5da803df4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_CreateDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan. +# +def create_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new + + # Call the create_data_scan method. + result = client.create_data_scan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataScanService_CreateDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb new file mode 100644 index 000000000000..af01e019be16 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_DeleteDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan. +# +def delete_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new + + # Call the delete_data_scan method. + result = client.delete_data_scan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataScanService_DeleteDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb new file mode 100644 index 000000000000..eab1de8202ec --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the generate_data_quality_rules call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules. +# +def generate_data_quality_rules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new + + # Call the generate_data_quality_rules method. + result = client.generate_data_quality_rules request + + # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. + p result +end +# [END dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb new file mode 100644 index 000000000000..dced954461e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_GetDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan. +# +def get_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new + + # Call the get_data_scan method. + result = client.get_data_scan request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. + p result +end +# [END dataplex_v1_generated_DataScanService_GetDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb new file mode 100644 index 000000000000..5e2e0112253e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_GetDataScanJob_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_scan_job call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job. +# +def get_data_scan_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new + + # Call the get_data_scan_job method. + result = client.get_data_scan_job request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. + p result +end +# [END dataplex_v1_generated_DataScanService_GetDataScanJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb new file mode 100644 index 000000000000..1c17e1599263 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_ListDataScanJobs_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_scan_jobs call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs. +# +def list_data_scan_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new + + # Call the list_data_scan_jobs method. + result = client.list_data_scan_jobs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. + p item + end +end +# [END dataplex_v1_generated_DataScanService_ListDataScanJobs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb new file mode 100644 index 000000000000..54ffbe334d01 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_ListDataScans_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_scans call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans. +# +def list_data_scans + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new + + # Call the list_data_scans method. + result = client.list_data_scans request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. + p item + end +end +# [END dataplex_v1_generated_DataScanService_ListDataScans_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb new file mode 100644 index 000000000000..f55818ed8adc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_RunDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the run_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan. +# +def run_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new + + # Call the run_data_scan method. + result = client.run_data_scan request + + # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. + p result +end +# [END dataplex_v1_generated_DataScanService_RunDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb new file mode 100644 index 000000000000..7b26badc2ad8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_UpdateDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan. +# +def update_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new + + # Call the update_data_scan method. + result = client.update_data_scan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataScanService_UpdateDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb new file mode 100644 index 000000000000..62e0e7f23812 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_data_attribute call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute. +# +def create_data_attribute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new + + # Call the create_data_attribute method. + result = client.create_data_attribute request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb new file mode 100644 index 000000000000..5dabda7bd877 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_data_attribute_binding call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding. +# +def create_data_attribute_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new + + # Call the create_data_attribute_binding method. + result = client.create_data_attribute_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb new file mode 100644 index 000000000000..b7a056141f7c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_data_taxonomy call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy. +# +def create_data_taxonomy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new + + # Call the create_data_taxonomy method. + result = client.create_data_taxonomy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb new file mode 100644 index 000000000000..4d84a87bda45 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_data_attribute call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute. +# +def delete_data_attribute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new + + # Call the delete_data_attribute method. + result = client.delete_data_attribute request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb new file mode 100644 index 000000000000..e970651237e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_data_attribute_binding call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding. +# +def delete_data_attribute_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new + + # Call the delete_data_attribute_binding method. + result = client.delete_data_attribute_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb new file mode 100644 index 000000000000..033d8d48c223 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_data_taxonomy call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy. +# +def delete_data_taxonomy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new + + # Call the delete_data_taxonomy method. + result = client.delete_data_taxonomy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb new file mode 100644 index 000000000000..abe63f31f367 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_attribute call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute. +# +def get_data_attribute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new + + # Call the get_data_attribute method. + result = client.get_data_attribute request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. + p result +end +# [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb new file mode 100644 index 000000000000..8c7d901dad8f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_attribute_binding call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding. +# +def get_data_attribute_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new + + # Call the get_data_attribute_binding method. + result = client.get_data_attribute_binding request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. + p result +end +# [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb new file mode 100644 index 000000000000..7bf0cd32bd75 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_taxonomy call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy. +# +def get_data_taxonomy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new + + # Call the get_data_taxonomy method. + result = client.get_data_taxonomy request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. + p result +end +# [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb new file mode 100644 index 000000000000..fad7c5897a7d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_attribute_bindings call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings. +# +def list_data_attribute_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new + + # Call the list_data_attribute_bindings method. + result = client.list_data_attribute_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. + p item + end +end +# [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb new file mode 100644 index 000000000000..55c9a289ae36 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_attributes call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes. +# +def list_data_attributes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new + + # Call the list_data_attributes method. + result = client.list_data_attributes request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. + p item + end +end +# [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb new file mode 100644 index 000000000000..3e5870ec0258 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_taxonomies call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies. +# +def list_data_taxonomies + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new + + # Call the list_data_taxonomies method. + result = client.list_data_taxonomies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. + p item + end +end +# [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb new file mode 100644 index 000000000000..ee672d4f9dec --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_data_attribute call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute. +# +def update_data_attribute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new + + # Call the update_data_attribute method. + result = client.update_data_attribute request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb new file mode 100644 index 000000000000..a020c8860103 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_data_attribute_binding call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding. +# +def update_data_attribute_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new + + # Call the update_data_attribute_binding method. + result = client.update_data_attribute_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb new file mode 100644 index 000000000000..6985aff5b2c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_data_taxonomy call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy. +# +def update_data_taxonomy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new + + # Call the update_data_taxonomy method. + result = client.update_data_taxonomy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb new file mode 100644 index 000000000000..476f4f673938 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_CancelJob_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the cancel_job call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job. +# +def cancel_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CancelJobRequest.new + + # Call the cancel_job method. + result = client.cancel_job request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataplex_v1_generated_DataplexService_CancelJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb new file mode 100644 index 000000000000..b830cdb49245 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_CreateAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_asset call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset. +# +def create_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new + + # Call the create_asset method. + result = client.create_asset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_CreateAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb new file mode 100644 index 000000000000..cc4ed9ab1745 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_CreateEnvironment_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_environment call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#create_environment. +# +def create_environment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new + + # Call the create_environment method. + result = client.create_environment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_CreateEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb new file mode 100644 index 000000000000..89eac2aa7769 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_CreateLake_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_lake call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake. +# +def create_lake + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new + + # Call the create_lake method. + result = client.create_lake request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_CreateLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb new file mode 100644 index 000000000000..a0ad46d5e011 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_CreateTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#create_task. +# +def create_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new + + # Call the create_task method. + result = client.create_task request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_CreateTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb new file mode 100644 index 000000000000..59801ff23b87 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_CreateZone_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_zone call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone. +# +def create_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new + + # Call the create_zone method. + result = client.create_zone request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_CreateZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb new file mode 100644 index 000000000000..1a298cfcc413 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_DeleteAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_asset call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset. +# +def delete_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new + + # Call the delete_asset method. + result = client.delete_asset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_DeleteAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb new file mode 100644 index 000000000000..924fdce94a2b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_DeleteEnvironment_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_environment call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_environment. +# +def delete_environment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new + + # Call the delete_environment method. + result = client.delete_environment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_DeleteEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb new file mode 100644 index 000000000000..7e48a9f3bc20 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_DeleteLake_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_lake call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake. +# +def delete_lake + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new + + # Call the delete_lake method. + result = client.delete_lake request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_DeleteLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb new file mode 100644 index 000000000000..aeaf3570fdda --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_DeleteTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task. +# +def delete_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new + + # Call the delete_task method. + result = client.delete_task request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_DeleteTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb new file mode 100644 index 000000000000..f091b4f3316e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_DeleteZone_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_zone call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone. +# +def delete_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new + + # Call the delete_zone method. + result = client.delete_zone request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_DeleteZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb new file mode 100644 index 000000000000..ece27d07087a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_GetAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_asset call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset. +# +def get_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetAssetRequest.new + + # Call the get_asset method. + result = client.get_asset request + + # The returned object is of type Google::Cloud::Dataplex::V1::Asset. + p result +end +# [END dataplex_v1_generated_DataplexService_GetAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb new file mode 100644 index 000000000000..3273a7e0da3a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_GetEnvironment_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_environment call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_environment. +# +def get_environment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new + + # Call the get_environment method. + result = client.get_environment request + + # The returned object is of type Google::Cloud::Dataplex::V1::Environment. + p result +end +# [END dataplex_v1_generated_DataplexService_GetEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb new file mode 100644 index 000000000000..26f9422acca1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_GetJob_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_job call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_job. +# +def get_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetJobRequest.new + + # Call the get_job method. + result = client.get_job request + + # The returned object is of type Google::Cloud::Dataplex::V1::Job. + p result +end +# [END dataplex_v1_generated_DataplexService_GetJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb new file mode 100644 index 000000000000..68cf80ffd32a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_GetLake_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_lake call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake. +# +def get_lake + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetLakeRequest.new + + # Call the get_lake method. + result = client.get_lake request + + # The returned object is of type Google::Cloud::Dataplex::V1::Lake. + p result +end +# [END dataplex_v1_generated_DataplexService_GetLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb new file mode 100644 index 000000000000..b23744f5aba3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_GetTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_task. +# +def get_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetTaskRequest.new + + # Call the get_task method. + result = client.get_task request + + # The returned object is of type Google::Cloud::Dataplex::V1::Task. + p result +end +# [END dataplex_v1_generated_DataplexService_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb new file mode 100644 index 000000000000..5773281a042c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_GetZone_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_zone call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone. +# +def get_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetZoneRequest.new + + # Call the get_zone method. + result = client.get_zone request + + # The returned object is of type Google::Cloud::Dataplex::V1::Zone. + p result +end +# [END dataplex_v1_generated_DataplexService_GetZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb new file mode 100644 index 000000000000..3de45de0692c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListAssetActions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_asset_actions call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions. +# +def list_asset_actions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new + + # Call the list_asset_actions method. + result = client.list_asset_actions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListAssetActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb new file mode 100644 index 000000000000..d45ce372dfbe --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListAssets_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_assets call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets. +# +def list_assets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new + + # Call the list_assets method. + result = client.list_assets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb new file mode 100644 index 000000000000..e3b8760b21d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListEnvironments_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_environments call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_environments. +# +def list_environments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new + + # Call the list_environments method. + result = client.list_environments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Environment. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListEnvironments_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb new file mode 100644 index 000000000000..6d71874cd9e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListJobs_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_jobs call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs. +# +def list_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListJobsRequest.new + + # Call the list_jobs method. + result = client.list_jobs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Job. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListJobs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb new file mode 100644 index 000000000000..2cbe46f9ec50 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListLakeActions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_lake_actions call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions. +# +def list_lake_actions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new + + # Call the list_lake_actions method. + result = client.list_lake_actions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListLakeActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb new file mode 100644 index 000000000000..32b87c2dd3af --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListLakes_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_lakes call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes. +# +def list_lakes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListLakesRequest.new + + # Call the list_lakes method. + result = client.list_lakes request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListLakes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb new file mode 100644 index 000000000000..04d0ae4da992 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListSessions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_sessions call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_sessions. +# +def list_sessions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new + + # Call the list_sessions method. + result = client.list_sessions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Session. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListSessions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb new file mode 100644 index 000000000000..41affa17810a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListTasks_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_tasks call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks. +# +def list_tasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListTasksRequest.new + + # Call the list_tasks method. + result = client.list_tasks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Task. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb new file mode 100644 index 000000000000..c6ab49811f0e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListZoneActions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_zone_actions call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions. +# +def list_zone_actions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new + + # Call the list_zone_actions method. + result = client.list_zone_actions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListZoneActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb new file mode 100644 index 000000000000..aba04972dae0 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListZones_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_zones call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones. +# +def list_zones + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListZonesRequest.new + + # Call the list_zones method. + result = client.list_zones request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListZones_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb new file mode 100644 index 000000000000..bf51744559b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_RunTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the run_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#run_task. +# +def run_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::RunTaskRequest.new + + # Call the run_task method. + result = client.run_task request + + # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. + p result +end +# [END dataplex_v1_generated_DataplexService_RunTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb new file mode 100644 index 000000000000..07a02bd339b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_UpdateAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_asset call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset. +# +def update_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new + + # Call the update_asset method. + result = client.update_asset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_UpdateAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb new file mode 100644 index 000000000000..bf327a685bca --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_UpdateEnvironment_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_environment call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#update_environment. +# +def update_environment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new + + # Call the update_environment method. + result = client.update_environment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_UpdateEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb new file mode 100644 index 000000000000..d4dda821cac2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_UpdateLake_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_lake call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake. +# +def update_lake + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new + + # Call the update_lake method. + result = client.update_lake request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_UpdateLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb new file mode 100644 index 000000000000..3440b1c8c05e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_UpdateTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#update_task. +# +def update_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new + + # Call the update_task method. + result = client.update_task request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_UpdateTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb new file mode 100644 index 000000000000..9ab74438a946 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_UpdateZone_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_zone call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone. +# +def update_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new + + # Call the update_zone method. + result = client.update_zone request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_UpdateZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb new file mode 100644 index 000000000000..f19b23bf2929 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_CreateEntity_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_entity call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity. +# +def create_entity + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEntityRequest.new + + # Call the create_entity method. + result = client.create_entity request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + p result +end +# [END dataplex_v1_generated_MetadataService_CreateEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb new file mode 100644 index 000000000000..7eaff8ebc340 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_CreatePartition_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_partition call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition. +# +def create_partition + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new + + # Call the create_partition method. + result = client.create_partition request + + # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + p result +end +# [END dataplex_v1_generated_MetadataService_CreatePartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb new file mode 100644 index 000000000000..6269c6757544 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_DeleteEntity_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_entity call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity. +# +def delete_entity + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new + + # Call the delete_entity method. + result = client.delete_entity request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataplex_v1_generated_MetadataService_DeleteEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb new file mode 100644 index 000000000000..31b484f3720d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_DeletePartition_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_partition call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition. +# +def delete_partition + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new + + # Call the delete_partition method. + result = client.delete_partition request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataplex_v1_generated_MetadataService_DeletePartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb new file mode 100644 index 000000000000..9d31a3e13b07 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_GetEntity_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_entity call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity. +# +def get_entity + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEntityRequest.new + + # Call the get_entity method. + result = client.get_entity request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + p result +end +# [END dataplex_v1_generated_MetadataService_GetEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb new file mode 100644 index 000000000000..278958c7dba3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_GetPartition_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_partition call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition. +# +def get_partition + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new + + # Call the get_partition method. + result = client.get_partition request + + # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + p result +end +# [END dataplex_v1_generated_MetadataService_GetPartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb new file mode 100644 index 000000000000..a584b2b7d4df --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_ListEntities_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_entities call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities. +# +def list_entities + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new + + # Call the list_entities method. + result = client.list_entities request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. + p item + end +end +# [END dataplex_v1_generated_MetadataService_ListEntities_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb new file mode 100644 index 000000000000..b956ff846f47 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_ListPartitions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_partitions call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions. +# +def list_partitions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new + + # Call the list_partitions method. + result = client.list_partitions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. + p item + end +end +# [END dataplex_v1_generated_MetadataService_ListPartitions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb new file mode 100644 index 000000000000..78a3c2e43ade --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_UpdateEntity_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_entity call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity. +# +def update_entity + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new + + # Call the update_entity method. + result = client.update_entity request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + p result +end +# [END dataplex_v1_generated_MetadataService_UpdateEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json b/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json new file mode 100644 index 000000000000..e45d8ca85b2e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json @@ -0,0 +1,3855 @@ +{ + "client_library": { + "name": "google-cloud-dataplex-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.dataplex.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "dataplex_v1_generated_DataplexService_CreateLake_sync", + "title": "Snippet for the create_lake call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake.", + "file": "dataplex_service/create_lake.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_lake", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateLakeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CreateLake", + "full_name": "google.cloud.dataplex.v1.DataplexService.CreateLake", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_UpdateLake_sync", + "title": "Snippet for the update_lake call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake.", + "file": "dataplex_service/update_lake.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_lake", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateLakeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "UpdateLake", + "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateLake", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_DeleteLake_sync", + "title": "Snippet for the delete_lake call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake.", + "file": "dataplex_service/delete_lake.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_lake", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteLakeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "DeleteLake", + "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteLake", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListLakes_sync", + "title": "Snippet for the list_lakes call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes.", + "file": "dataplex_service/list_lakes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_lakes", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListLakesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListLakesResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListLakes", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListLakes", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetLake_sync", + "title": "Snippet for the get_lake call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake.", + "file": "dataplex_service/get_lake.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lake", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetLakeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Lake", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetLake", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetLake", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListLakeActions_sync", + "title": "Snippet for the list_lake_actions call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions.", + "file": "dataplex_service/list_lake_actions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_lake_actions", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListLakeActionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListLakeActions", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_CreateZone_sync", + "title": "Snippet for the create_zone call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone.", + "file": "dataplex_service/create_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_zone", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CreateZone", + "full_name": "google.cloud.dataplex.v1.DataplexService.CreateZone", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_UpdateZone_sync", + "title": "Snippet for the update_zone call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone.", + "file": "dataplex_service/update_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_zone", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "UpdateZone", + "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateZone", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_DeleteZone_sync", + "title": "Snippet for the delete_zone call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone.", + "file": "dataplex_service/delete_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_zone", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "DeleteZone", + "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteZone", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListZones_sync", + "title": "Snippet for the list_zones call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones.", + "file": "dataplex_service/list_zones.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_zones", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListZonesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListZonesResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListZones", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListZones", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetZone_sync", + "title": "Snippet for the get_zone call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone.", + "file": "dataplex_service/get_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_zone", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Zone", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetZone", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetZone", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListZoneActions_sync", + "title": "Snippet for the list_zone_actions call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions.", + "file": "dataplex_service/list_zone_actions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_zone_actions", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListZoneActionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListZoneActions", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_CreateAsset_sync", + "title": "Snippet for the create_asset call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset.", + "file": "dataplex_service/create_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CreateAsset", + "full_name": "google.cloud.dataplex.v1.DataplexService.CreateAsset", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_UpdateAsset_sync", + "title": "Snippet for the update_asset call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset.", + "file": "dataplex_service/update_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "UpdateAsset", + "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_DeleteAsset_sync", + "title": "Snippet for the delete_asset call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset.", + "file": "dataplex_service/delete_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "DeleteAsset", + "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListAssets_sync", + "title": "Snippet for the list_assets call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets.", + "file": "dataplex_service/list_assets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_assets", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListAssetsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListAssets", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListAssets", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetAsset_sync", + "title": "Snippet for the get_asset call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset.", + "file": "dataplex_service/get_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Asset", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetAsset", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetAsset", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListAssetActions_sync", + "title": "Snippet for the list_asset_actions call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions.", + "file": "dataplex_service/list_asset_actions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_asset_actions", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListAssetActionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListAssetActions", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_CreateTask_sync", + "title": "Snippet for the create_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_task.", + "file": "dataplex_service/create_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CreateTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.CreateTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_UpdateTask_sync", + "title": "Snippet for the update_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_task.", + "file": "dataplex_service/update_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "UpdateTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_DeleteTask_sync", + "title": "Snippet for the delete_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task.", + "file": "dataplex_service/delete_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "DeleteTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListTasks_sync", + "title": "Snippet for the list_tasks call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks.", + "file": "dataplex_service/list_tasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tasks", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListTasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListTasksResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListTasks", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListTasks", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetTask_sync", + "title": "Snippet for the get_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_task.", + "file": "dataplex_service/get_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Task", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListJobs_sync", + "title": "Snippet for the list_jobs call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs.", + "file": "dataplex_service/list_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_jobs", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListJobsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListJobs", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListJobs", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_RunTask_sync", + "title": "Snippet for the run_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#run_task.", + "file": "dataplex_service/run_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#run_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::RunTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::RunTaskResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "RunTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.RunTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetJob_sync", + "title": "Snippet for the get_job call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_job.", + "file": "dataplex_service/get_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_job", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Job", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetJob", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetJob", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_CancelJob_sync", + "title": "Snippet for the cancel_job call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job.", + "file": "dataplex_service/cancel_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_job", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CancelJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CancelJob", + "full_name": "google.cloud.dataplex.v1.DataplexService.CancelJob", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_CreateEnvironment_sync", + "title": "Snippet for the create_environment call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_environment.", + "file": "dataplex_service/create_environment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_environment", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_environment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CreateEnvironment", + "full_name": "google.cloud.dataplex.v1.DataplexService.CreateEnvironment", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_UpdateEnvironment_sync", + "title": "Snippet for the update_environment call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_environment.", + "file": "dataplex_service/update_environment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_environment", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_environment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "UpdateEnvironment", + "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateEnvironment", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_DeleteEnvironment_sync", + "title": "Snippet for the delete_environment call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_environment.", + "file": "dataplex_service/delete_environment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_environment", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_environment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "DeleteEnvironment", + "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteEnvironment", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListEnvironments_sync", + "title": "Snippet for the list_environments call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_environments.", + "file": "dataplex_service/list_environments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_environments", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_environments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListEnvironments", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListEnvironments", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetEnvironment_sync", + "title": "Snippet for the get_environment call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_environment.", + "file": "dataplex_service/get_environment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_environment", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_environment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEnvironmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Environment", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetEnvironment", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetEnvironment", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListSessions_sync", + "title": "Snippet for the list_sessions call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_sessions.", + "file": "dataplex_service/list_sessions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sessions", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_sessions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListSessionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListSessionsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListSessions", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListSessions", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_CreateEntryType_sync", + "title": "Snippet for the create_entry_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type.", + "file": "catalog_service/create_entry_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_entry_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CreateEntryType", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntryType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntryType_sync", + "title": "Snippet for the update_entry_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type.", + "file": "catalog_service/update_entry_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_entry_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "UpdateEntryType", + "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntryType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntryType_sync", + "title": "Snippet for the delete_entry_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type.", + "file": "catalog_service/delete_entry_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_entry_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "DeleteEntryType", + "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntryType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_ListEntryTypes_sync", + "title": "Snippet for the list_entry_types call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types.", + "file": "catalog_service/list_entry_types.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_entry_types", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEntryTypesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEntryTypesResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "ListEntryTypes", + "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntryTypes", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_GetEntryType_sync", + "title": "Snippet for the get_entry_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type.", + "file": "catalog_service/get_entry_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_entry_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEntryTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::EntryType", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "GetEntryType", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntryType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_CreateAspectType_sync", + "title": "Snippet for the create_aspect_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type.", + "file": "catalog_service/create_aspect_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_aspect_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CreateAspectType", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateAspectType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_UpdateAspectType_sync", + "title": "Snippet for the update_aspect_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type.", + "file": "catalog_service/update_aspect_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_aspect_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "UpdateAspectType", + "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateAspectType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_DeleteAspectType_sync", + "title": "Snippet for the delete_aspect_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type.", + "file": "catalog_service/delete_aspect_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_aspect_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "DeleteAspectType", + "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteAspectType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_ListAspectTypes_sync", + "title": "Snippet for the list_aspect_types call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types.", + "file": "catalog_service/list_aspect_types.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_aspect_types", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListAspectTypesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListAspectTypesResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "ListAspectTypes", + "full_name": "google.cloud.dataplex.v1.CatalogService.ListAspectTypes", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_GetAspectType_sync", + "title": "Snippet for the get_aspect_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type.", + "file": "catalog_service/get_aspect_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_aspect_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetAspectTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::AspectType", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "GetAspectType", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetAspectType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_CreateEntryGroup_sync", + "title": "Snippet for the create_entry_group call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group.", + "file": "catalog_service/create_entry_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_entry_group", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CreateEntryGroup", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntryGroup", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync", + "title": "Snippet for the update_entry_group call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group.", + "file": "catalog_service/update_entry_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_entry_group", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "UpdateEntryGroup", + "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntryGroup", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync", + "title": "Snippet for the delete_entry_group call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group.", + "file": "catalog_service/delete_entry_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_entry_group", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "DeleteEntryGroup", + "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntryGroup", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_ListEntryGroups_sync", + "title": "Snippet for the list_entry_groups call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups.", + "file": "catalog_service/list_entry_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_entry_groups", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "ListEntryGroups", + "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntryGroups", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_GetEntryGroup_sync", + "title": "Snippet for the get_entry_group call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group.", + "file": "catalog_service/get_entry_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_entry_group", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEntryGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::EntryGroup", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "GetEntryGroup", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntryGroup", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_CreateEntry_sync", + "title": "Snippet for the create_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry.", + "file": "catalog_service/create_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CreateEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntry_sync", + "title": "Snippet for the update_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry.", + "file": "catalog_service/update_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "UpdateEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntry_sync", + "title": "Snippet for the delete_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry.", + "file": "catalog_service/delete_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "DeleteEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_ListEntries_sync", + "title": "Snippet for the list_entries call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries.", + "file": "catalog_service/list_entries.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_entries", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEntriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEntriesResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "ListEntries", + "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntries", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_GetEntry_sync", + "title": "Snippet for the get_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry.", + "file": "catalog_service/get_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "GetEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_LookupEntry_sync", + "title": "Snippet for the lookup_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry.", + "file": "catalog_service/lookup_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "lookup_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::LookupEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "LookupEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.LookupEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_SearchEntries_sync", + "title": "Snippet for the search_entries call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries.", + "file": "catalog_service/search_entries.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_entries", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::SearchEntriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::SearchEntriesResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "SearchEntries", + "full_name": "google.cloud.dataplex.v1.CatalogService.SearchEntries", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_CreateContent_sync", + "title": "Snippet for the create_content call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#create_content.", + "file": "content_service/create_content.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_content", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#create_content", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateContentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Content", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "CreateContent", + "full_name": "google.cloud.dataplex.v1.ContentService.CreateContent", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_UpdateContent_sync", + "title": "Snippet for the update_content call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#update_content.", + "file": "content_service/update_content.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_content", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#update_content", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateContentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Content", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "UpdateContent", + "full_name": "google.cloud.dataplex.v1.ContentService.UpdateContent", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_DeleteContent_sync", + "title": "Snippet for the delete_content call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#delete_content.", + "file": "content_service/delete_content.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_content", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#delete_content", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteContentRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "DeleteContent", + "full_name": "google.cloud.dataplex.v1.ContentService.DeleteContent", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_GetContent_sync", + "title": "Snippet for the get_content call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#get_content.", + "file": "content_service/get_content.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_content", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#get_content", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetContentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Content", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "GetContent", + "full_name": "google.cloud.dataplex.v1.ContentService.GetContent", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#get_iam_policy.", + "file": "content_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.dataplex.v1.ContentService.GetIamPolicy", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#set_iam_policy.", + "file": "content_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.dataplex.v1.ContentService.SetIamPolicy", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#test_iam_permissions.", + "file": "content_service/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.dataplex.v1.ContentService.TestIamPermissions", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_ListContent_sync", + "title": "Snippet for the list_content call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#list_content.", + "file": "content_service/list_content.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_content", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#list_content", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListContentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListContentResponse", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "ListContent", + "full_name": "google.cloud.dataplex.v1.ContentService.ListContent", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync", + "title": "Snippet for the create_data_taxonomy call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy.", + "file": "data_taxonomy_service/create_data_taxonomy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_taxonomy", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "CreateDataTaxonomy", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataTaxonomy", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync", + "title": "Snippet for the update_data_taxonomy call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy.", + "file": "data_taxonomy_service/update_data_taxonomy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_taxonomy", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "UpdateDataTaxonomy", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataTaxonomy", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync", + "title": "Snippet for the delete_data_taxonomy call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy.", + "file": "data_taxonomy_service/delete_data_taxonomy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_taxonomy", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "DeleteDataTaxonomy", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataTaxonomy", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync", + "title": "Snippet for the list_data_taxonomies call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies.", + "file": "data_taxonomy_service/list_data_taxonomies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_taxonomies", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "ListDataTaxonomies", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataTaxonomies", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync", + "title": "Snippet for the get_data_taxonomy call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy.", + "file": "data_taxonomy_service/get_data_taxonomy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_taxonomy", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataTaxonomy", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "GetDataTaxonomy", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataTaxonomy", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync", + "title": "Snippet for the create_data_attribute_binding call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding.", + "file": "data_taxonomy_service/create_data_attribute_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_attribute_binding", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "CreateDataAttributeBinding", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeBinding", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync", + "title": "Snippet for the update_data_attribute_binding call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding.", + "file": "data_taxonomy_service/update_data_attribute_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_attribute_binding", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "UpdateDataAttributeBinding", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeBinding", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync", + "title": "Snippet for the delete_data_attribute_binding call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding.", + "file": "data_taxonomy_service/delete_data_attribute_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_attribute_binding", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "DeleteDataAttributeBinding", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeBinding", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync", + "title": "Snippet for the list_data_attribute_bindings call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings.", + "file": "data_taxonomy_service/list_data_attribute_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_attribute_bindings", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "ListDataAttributeBindings", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributeBindings", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync", + "title": "Snippet for the get_data_attribute_binding call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding.", + "file": "data_taxonomy_service/get_data_attribute_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_attribute_binding", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataAttributeBinding", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "GetDataAttributeBinding", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeBinding", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync", + "title": "Snippet for the create_data_attribute call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute.", + "file": "data_taxonomy_service/create_data_attribute.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_attribute", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "CreateDataAttribute", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttribute", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync", + "title": "Snippet for the update_data_attribute call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute.", + "file": "data_taxonomy_service/update_data_attribute.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_attribute", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "UpdateDataAttribute", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttribute", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync", + "title": "Snippet for the delete_data_attribute call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute.", + "file": "data_taxonomy_service/delete_data_attribute.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_attribute", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "DeleteDataAttribute", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttribute", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync", + "title": "Snippet for the list_data_attributes call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes.", + "file": "data_taxonomy_service/list_data_attributes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_attributes", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataAttributesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataAttributesResponse", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "ListDataAttributes", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributes", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync", + "title": "Snippet for the get_data_attribute call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute.", + "file": "data_taxonomy_service/get_data_attribute.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_attribute", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataAttributeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataAttribute", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "GetDataAttribute", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttribute", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_CreateDataScan_sync", + "title": "Snippet for the create_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan.", + "file": "data_scan_service/create_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "CreateDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.CreateDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_UpdateDataScan_sync", + "title": "Snippet for the update_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan.", + "file": "data_scan_service/update_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "UpdateDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.UpdateDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_DeleteDataScan_sync", + "title": "Snippet for the delete_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan.", + "file": "data_scan_service/delete_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "DeleteDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.DeleteDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_GetDataScan_sync", + "title": "Snippet for the get_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan.", + "file": "data_scan_service/get_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataScan", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "GetDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.GetDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_ListDataScans_sync", + "title": "Snippet for the list_data_scans call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans.", + "file": "data_scan_service/list_data_scans.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_scans", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataScansRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataScansResponse", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "ListDataScans", + "full_name": "google.cloud.dataplex.v1.DataScanService.ListDataScans", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_RunDataScan_sync", + "title": "Snippet for the run_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan.", + "file": "data_scan_service/run_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::RunDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::RunDataScanResponse", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "RunDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.RunDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_GetDataScanJob_sync", + "title": "Snippet for the get_data_scan_job call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job.", + "file": "data_scan_service/get_data_scan_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_scan_job", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataScanJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataScanJob", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "GetDataScanJob", + "full_name": "google.cloud.dataplex.v1.DataScanService.GetDataScanJob", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_ListDataScanJobs_sync", + "title": "Snippet for the list_data_scan_jobs call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs.", + "file": "data_scan_service/list_data_scan_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_scan_jobs", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "ListDataScanJobs", + "full_name": "google.cloud.dataplex.v1.DataScanService.ListDataScanJobs", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync", + "title": "Snippet for the generate_data_quality_rules call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules.", + "file": "data_scan_service/generate_data_quality_rules.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_data_quality_rules", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "GenerateDataQualityRules", + "full_name": "google.cloud.dataplex.v1.DataScanService.GenerateDataQualityRules", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_CreateEntity_sync", + "title": "Snippet for the create_entity call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity.", + "file": "metadata_service/create_entity.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_entity", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEntityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entity", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "CreateEntity", + "full_name": "google.cloud.dataplex.v1.MetadataService.CreateEntity", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_UpdateEntity_sync", + "title": "Snippet for the update_entity call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity.", + "file": "metadata_service/update_entity.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_entity", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEntityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entity", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "UpdateEntity", + "full_name": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_DeleteEntity_sync", + "title": "Snippet for the delete_entity call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity.", + "file": "metadata_service/delete_entity.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_entity", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEntityRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "DeleteEntity", + "full_name": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_GetEntity_sync", + "title": "Snippet for the get_entity call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity.", + "file": "metadata_service/get_entity.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_entity", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEntityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entity", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "GetEntity", + "full_name": "google.cloud.dataplex.v1.MetadataService.GetEntity", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_ListEntities_sync", + "title": "Snippet for the list_entities call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities.", + "file": "metadata_service/list_entities.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_entities", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEntitiesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEntitiesResponse", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "ListEntities", + "full_name": "google.cloud.dataplex.v1.MetadataService.ListEntities", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_CreatePartition_sync", + "title": "Snippet for the create_partition call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition.", + "file": "metadata_service/create_partition.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_partition", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreatePartitionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Partition", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "CreatePartition", + "full_name": "google.cloud.dataplex.v1.MetadataService.CreatePartition", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_DeletePartition_sync", + "title": "Snippet for the delete_partition call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition.", + "file": "metadata_service/delete_partition.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_partition", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeletePartitionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "DeletePartition", + "full_name": "google.cloud.dataplex.v1.MetadataService.DeletePartition", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_GetPartition_sync", + "title": "Snippet for the get_partition call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition.", + "file": "metadata_service/get_partition.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_partition", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetPartitionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Partition", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "GetPartition", + "full_name": "google.cloud.dataplex.v1.MetadataService.GetPartition", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_ListPartitions_sync", + "title": "Snippet for the list_partitions call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions.", + "file": "metadata_service/list_partitions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_partitions", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListPartitionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListPartitionsResponse", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "ListPartitions", + "full_name": "google.cloud.dataplex.v1.MetadataService.ListPartitions", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb new file mode 100644 index 000000000000..d65a7794ef93 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb @@ -0,0 +1,389 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/catalog_pb" +require "google/cloud/dataplex/v1/catalog_services_pb" +require "google/cloud/dataplex/v1/catalog_service" + +class ::Google::Cloud::Dataplex::V1::CatalogService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb new file mode 100644 index 000000000000..c1f09a9564e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb @@ -0,0 +1,95 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/catalog_service" + +class ::Google::Cloud::Dataplex::V1::CatalogService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_aspect_type_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.aspect_type_path project: "value0", location: "value1", aspect_type: "value2" + assert_equal "projects/value0/locations/value1/aspectTypes/value2", path + end + end + + def test_entry_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entry_path project: "value0", location: "value1", entry_group: "value2", entry: "value3" + assert_equal "projects/value0/locations/value1/entryGroups/value2/entries/value3", path + end + end + + def test_entry_group_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entry_group_path project: "value0", location: "value1", entry_group: "value2" + assert_equal "projects/value0/locations/value1/entryGroups/value2", path + end + end + + def test_entry_type_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entry_type_path project: "value0", location: "value1", entry_type: "value2" + assert_equal "projects/value0/locations/value1/entryTypes/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb new file mode 100644 index 000000000000..9d3d20667729 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb @@ -0,0 +1,1330 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/dataplex/v1/catalog_pb" +require "google/cloud/dataplex/v1/catalog_service/rest" + + +class ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_entry_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_type_id = "hello world" + entry_type = {} + validate_only = true + + create_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_entry_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_entry_type parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_entry_type ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_entry_type(::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_entry_type_client_stub.call_count + end + end + end + + def test_update_entry_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + entry_type = {} + update_mask = {} + validate_only = true + + update_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_entry_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_entry_type entry_type: entry_type, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_entry_type ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_entry_type(::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_entry_type_client_stub.call_count + end + end + end + + def test_delete_entry_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_entry_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_entry_type({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_entry_type name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_entry_type ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_entry_type({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_entry_type(::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_entry_type_client_stub.call_count + end + end + end + + def test_list_entry_types + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_entry_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_entry_types_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_entry_types_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_entry_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_entry_types ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_entry_types(::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_entry_types_client_stub.call_count + end + end + end + + def test_get_entry_type + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::EntryType.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_entry_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_entry_type({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_entry_type name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_entry_type ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_entry_type({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_entry_type(::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_entry_type_client_stub.call_count + end + end + end + + def test_create_aspect_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + aspect_type_id = "hello world" + aspect_type = {} + validate_only = true + + create_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_aspect_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_aspect_type parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_aspect_type ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_aspect_type(::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_aspect_type_client_stub.call_count + end + end + end + + def test_update_aspect_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + aspect_type = {} + update_mask = {} + validate_only = true + + update_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_aspect_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_aspect_type aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_aspect_type ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_aspect_type(::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_aspect_type_client_stub.call_count + end + end + end + + def test_delete_aspect_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_aspect_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_aspect_type({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_aspect_type name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_aspect_type ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_aspect_type({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_aspect_type(::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_aspect_type_client_stub.call_count + end + end + end + + def test_list_aspect_types + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_aspect_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_aspect_types_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_aspect_types_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_aspect_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_aspect_types ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_aspect_types(::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_aspect_types_client_stub.call_count + end + end + end + + def test_get_aspect_type + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::AspectType.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_aspect_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_aspect_type({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_aspect_type name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_aspect_type ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_aspect_type({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_aspect_type(::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_aspect_type_client_stub.call_count + end + end + end + + def test_create_entry_group + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_group_id = "hello world" + entry_group = {} + validate_only = true + + create_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_entry_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_entry_group parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_entry_group ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_entry_group(::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_entry_group_client_stub.call_count + end + end + end + + def test_update_entry_group + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + entry_group = {} + update_mask = {} + validate_only = true + + update_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_entry_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_entry_group entry_group: entry_group, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_entry_group ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_entry_group(::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_entry_group_client_stub.call_count + end + end + end + + def test_delete_entry_group + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_entry_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_entry_group({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_entry_group name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_entry_group ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_entry_group({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_entry_group(::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_entry_group_client_stub.call_count + end + end + end + + def test_list_entry_groups + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_entry_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_entry_groups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_entry_groups_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_entry_groups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_entry_groups ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_entry_groups(::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_entry_groups_client_stub.call_count + end + end + end + + def test_get_entry_group + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::EntryGroup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_entry_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_entry_group({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_entry_group name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_entry_group ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_entry_group({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_entry_group(::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_entry_group_client_stub.call_count + end + end + end + + def test_create_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_id = "hello world" + entry = {} + + create_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_entry parent: parent, entry_id: entry_id, entry: entry do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_entry ::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_entry(::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_entry_client_stub.call_count + end + end + end + + def test_update_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + entry = {} + update_mask = {} + allow_missing = true + delete_missing_aspects = true + aspect_keys = ["hello world"] + + update_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_entry entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_entry ::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_entry(::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_entry_client_stub.call_count + end + end + end + + def test_delete_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_entry({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_entry name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_entry ::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_entry({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_entry(::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_entry_client_stub.call_count + end + end + end + + def test_list_entries + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_entries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_entries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_entries_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_entries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_entries ::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_entries(::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_entries_client_stub.call_count + end + end + end + + def test_get_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTRY_VIEW_UNSPECIFIED + aspect_types = ["hello world"] + paths = ["hello world"] + + get_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_entry name: name, view: view, aspect_types: aspect_types, paths: paths do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_entry ::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_entry(::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_entry_client_stub.call_count + end + end + end + + def test_lookup_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTRY_VIEW_UNSPECIFIED + aspect_types = ["hello world"] + paths = ["hello world"] + entry = "hello world" + + lookup_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_lookup_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lookup_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.lookup_entry name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.lookup_entry ::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.lookup_entry(::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, lookup_entry_client_stub.call_count + end + end + end + + def test_search_entries + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + scope = "hello world" + + search_entries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_search_entries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_entries_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_entries_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb new file mode 100644 index 000000000000..9d74d6473f35 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb @@ -0,0 +1,1538 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/catalog_pb" +require "google/cloud/dataplex/v1/catalog_services_pb" +require "google/cloud/dataplex/v1/catalog_service" + +class ::Google::Cloud::Dataplex::V1::CatalogService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_entry_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_type_id = "hello world" + entry_type = {} + validate_only = true + + create_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_entry_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["entry_type_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryType), request["entry_type"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_entry_type parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_entry_type ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_entry_type(::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_entry_type_client_stub.call_rpc_count + end + end + + def test_update_entry_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + entry_type = {} + update_mask = {} + validate_only = true + + update_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_entry_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryType), request["entry_type"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_entry_type entry_type: entry_type, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_entry_type ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_entry_type(::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_entry_type_client_stub.call_rpc_count + end + end + + def test_delete_entry_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_entry_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_entry_type({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_entry_type name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_entry_type ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_entry_type({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_entry_type(::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_entry_type_client_stub.call_rpc_count + end + end + + def test_list_entry_types + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_entry_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_entry_types, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_entry_types_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_entry_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_entry_types ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_entry_types(::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_entry_types_client_stub.call_rpc_count + end + end + + def test_get_entry_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::EntryType.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_entry_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_entry_type({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_entry_type name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_entry_type ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_entry_type({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_entry_type(::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_entry_type_client_stub.call_rpc_count + end + end + + def test_create_aspect_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + aspect_type_id = "hello world" + aspect_type = {} + validate_only = true + + create_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_aspect_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["aspect_type_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::AspectType), request["aspect_type"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_aspect_type parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_aspect_type ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_aspect_type(::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_aspect_type_client_stub.call_rpc_count + end + end + + def test_update_aspect_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + aspect_type = {} + update_mask = {} + validate_only = true + + update_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_aspect_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::AspectType), request["aspect_type"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_aspect_type aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_aspect_type ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_aspect_type(::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_aspect_type_client_stub.call_rpc_count + end + end + + def test_delete_aspect_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_aspect_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_aspect_type({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_aspect_type name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_aspect_type ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_aspect_type({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_aspect_type(::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_aspect_type_client_stub.call_rpc_count + end + end + + def test_list_aspect_types + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_aspect_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_aspect_types, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_aspect_types_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_aspect_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_aspect_types ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_aspect_types(::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_aspect_types_client_stub.call_rpc_count + end + end + + def test_get_aspect_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::AspectType.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_aspect_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_aspect_type({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_aspect_type name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_aspect_type ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_aspect_type({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_aspect_type(::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_aspect_type_client_stub.call_rpc_count + end + end + + def test_create_entry_group + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_group_id = "hello world" + entry_group = {} + validate_only = true + + create_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_entry_group, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["entry_group_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryGroup), request["entry_group"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_entry_group parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_entry_group ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_entry_group(::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_entry_group_client_stub.call_rpc_count + end + end + + def test_update_entry_group + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + entry_group = {} + update_mask = {} + validate_only = true + + update_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_entry_group, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryGroup), request["entry_group"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_entry_group entry_group: entry_group, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_entry_group ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_entry_group(::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_entry_group_client_stub.call_rpc_count + end + end + + def test_delete_entry_group + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_entry_group, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_entry_group({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_entry_group name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_entry_group ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_entry_group({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_entry_group(::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_entry_group_client_stub.call_rpc_count + end + end + + def test_list_entry_groups + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_entry_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_entry_groups, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_entry_groups_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_entry_groups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_entry_groups ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_entry_groups(::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_entry_groups_client_stub.call_rpc_count + end + end + + def test_get_entry_group + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::EntryGroup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_entry_group, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_entry_group({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_entry_group name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_entry_group ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_entry_group({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_entry_group(::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_entry_group_client_stub.call_rpc_count + end + end + + def test_create_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_id = "hello world" + entry = {} + + create_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["entry_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entry), request["entry"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_entry parent: parent, entry_id: entry_id, entry: entry do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_entry ::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_entry(::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_entry_client_stub.call_rpc_count + end + end + + def test_update_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + entry = {} + update_mask = {} + allow_missing = true + delete_missing_aspects = true + aspect_keys = ["hello world"] + + update_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entry), request["entry"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["allow_missing"] + assert_equal true, request["delete_missing_aspects"] + assert_equal ["hello world"], request["aspect_keys"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_entry entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_entry ::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_entry(::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_entry_client_stub.call_rpc_count + end + end + + def test_delete_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_entry({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_entry name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_entry ::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_entry({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_entry(::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_entry_client_stub.call_rpc_count + end + end + + def test_list_entries + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_entries, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntriesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_entries_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_entries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_entries ::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_entries(::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_entries_client_stub.call_rpc_count + end + end + + def test_get_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTRY_VIEW_UNSPECIFIED + aspect_types = ["hello world"] + paths = ["hello world"] + + get_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryRequest, request + assert_equal "hello world", request["name"] + assert_equal :ENTRY_VIEW_UNSPECIFIED, request["view"] + assert_equal ["hello world"], request["aspect_types"] + assert_equal ["hello world"], request["paths"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_entry name: name, view: view, aspect_types: aspect_types, paths: paths do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_entry ::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_entry(::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_entry_client_stub.call_rpc_count + end + end + + def test_lookup_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTRY_VIEW_UNSPECIFIED + aspect_types = ["hello world"] + paths = ["hello world"] + entry = "hello world" + + lookup_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lookup_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::LookupEntryRequest, request + assert_equal "hello world", request["name"] + assert_equal :ENTRY_VIEW_UNSPECIFIED, request["view"] + assert_equal ["hello world"], request["aspect_types"] + assert_equal ["hello world"], request["paths"] + assert_equal "hello world", request["entry"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, lookup_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.lookup_entry name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.lookup_entry ::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.lookup_entry(::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, lookup_entry_client_stub.call_rpc_count + end + end + + def test_search_entries + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + scope = "hello world" + + search_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_entries, name + assert_kind_of ::Google::Cloud::Dataplex::V1::SearchEntriesRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["query"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["scope"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_entries_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_entries_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb new file mode 100644 index 000000000000..c2ea8c62284f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/content_service" + +class ::Google::Cloud::Dataplex::V1::ContentService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_content_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.content_path project: "value0", location: "value1", lake: "value2", content: "value3" + assert_equal "projects/value0/locations/value1/lakes/value2/content/value3", path + end + end + + def test_lake_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lake_path project: "value0", location: "value1", lake: "value2" + assert_equal "projects/value0/locations/value1/lakes/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb new file mode 100644 index 000000000000..a0e45dc95ec6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb @@ -0,0 +1,535 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/dataplex/v1/content_pb" +require "google/cloud/dataplex/v1/content_service/rest" + + +class ::Google::Cloud::Dataplex::V1::ContentService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_content + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Content.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + content = {} + validate_only = true + + create_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_create_content_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_content({ parent: parent, content: content, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_content parent: parent, content: content, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_content ::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_content({ parent: parent, content: content, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_content(::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_content_client_stub.call_count + end + end + end + + def test_update_content + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Content.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + content = {} + validate_only = true + + update_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_update_content_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_content update_mask: update_mask, content: content, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_content ::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_content(::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_content_client_stub.call_count + end + end + end + + def test_delete_content + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_delete_content_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_content({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_content name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_content ::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_content({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_content(::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_content_client_stub.call_count + end + end + end + + def test_get_content + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Content.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :CONTENT_VIEW_UNSPECIFIED + + get_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_get_content_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_content({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_content name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_content ::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_content({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_content(::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_content_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_list_content + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListContentResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_list_content_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_content parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_content ::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_content(::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_content_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb new file mode 100644 index 000000000000..4d1b449973dd --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb @@ -0,0 +1,569 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/content_pb" +require "google/cloud/dataplex/v1/content_services_pb" +require "google/cloud/dataplex/v1/content_service" + +class ::Google::Cloud::Dataplex::V1::ContentService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_content + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Content.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + content = {} + validate_only = true + + create_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_content, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateContentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Content), request["content"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_content({ parent: parent, content: content, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_content parent: parent, content: content, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_content ::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_content({ parent: parent, content: content, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_content(::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_content_client_stub.call_rpc_count + end + end + + def test_update_content + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Content.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + content = {} + validate_only = true + + update_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_content, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateContentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Content), request["content"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_content update_mask: update_mask, content: content, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_content ::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_content(::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_content_client_stub.call_rpc_count + end + end + + def test_delete_content + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_content, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteContentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_content({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_content name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_content ::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_content({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_content(::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_content_client_stub.call_rpc_count + end + end + + def test_get_content + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Content.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :CONTENT_VIEW_UNSPECIFIED + + get_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_content, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetContentRequest, request + assert_equal "hello world", request["name"] + assert_equal :CONTENT_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_content({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_content name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_content ::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_content({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_content(::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_content_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_list_content + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListContentResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_content, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListContentRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_content parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_content ::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_content(::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_content_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb new file mode 100644 index 000000000000..fe360935dd72 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb @@ -0,0 +1,389 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/datascans_pb" +require "google/cloud/dataplex/v1/datascans_services_pb" +require "google/cloud/dataplex/v1/data_scan_service" + +class ::Google::Cloud::Dataplex::V1::DataScanService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb new file mode 100644 index 000000000000..38f511b8ed94 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/data_scan_service" + +class ::Google::Cloud::Dataplex::V1::DataScanService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_data_scan_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_scan_path project: "value0", location: "value1", dataScan: "value2" + assert_equal "projects/value0/locations/value1/dataScans/value2", path + end + end + + def test_data_scan_job_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_scan_job_path project: "value0", location: "value1", dataScan: "value2", job: "value3" + assert_equal "projects/value0/locations/value1/dataScans/value2/jobs/value3", path + end + end + + def test_entity_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entity_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb new file mode 100644 index 000000000000..d11b709f1ce5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb @@ -0,0 +1,591 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/dataplex/v1/datascans_pb" +require "google/cloud/dataplex/v1/data_scan_service/rest" + + +class ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_data_scan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_scan = {} + data_scan_id = "hello world" + validate_only = true + + create_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_create_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_scan parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_scan ::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_scan(::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_scan_client_stub.call_count + end + end + end + + def test_update_data_scan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_scan = {} + update_mask = {} + validate_only = true + + update_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_update_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_scan data_scan: data_scan, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_scan ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_scan(::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_scan_client_stub.call_count + end + end + end + + def test_delete_data_scan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_delete_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_scan({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_scan name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_scan ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_scan({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_scan(::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_scan_client_stub.call_count + end + end + end + + def test_get_data_scan + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataScan.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DATA_SCAN_VIEW_UNSPECIFIED + + get_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_get_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_scan({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_scan name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_scan ::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_scan({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_scan(::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_scan_client_stub.call_count + end + end + end + + def test_list_data_scans + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_scans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_list_data_scans_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_scans_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_scans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_scans ::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_scans(::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_scans_client_stub.call_count + end + end + end + + def test_run_data_scan + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + run_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_run_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_data_scan({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_data_scan name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_data_scan ::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_data_scan({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_data_scan(::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_data_scan_client_stub.call_count + end + end + end + + def test_get_data_scan_job + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataScanJob.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DATA_SCAN_JOB_VIEW_UNSPECIFIED + + get_data_scan_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_get_data_scan_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_scan_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_scan_job({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_scan_job name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_scan_job ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_scan_job({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_scan_job(::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_scan_job_client_stub.call_count + end + end + end + + def test_list_data_scan_jobs + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_data_scan_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_list_data_scan_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_scan_jobs_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_scan_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_scan_jobs ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_scan_jobs(::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_scan_jobs_client_stub.call_count + end + end + end + + def test_generate_data_quality_rules + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + generate_data_quality_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_generate_data_quality_rules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_data_quality_rules_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_data_quality_rules({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_data_quality_rules name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_data_quality_rules ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_data_quality_rules({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_data_quality_rules(::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_data_quality_rules_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb new file mode 100644 index 000000000000..392ea73c89c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb @@ -0,0 +1,665 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/datascans_pb" +require "google/cloud/dataplex/v1/datascans_services_pb" +require "google/cloud/dataplex/v1/data_scan_service" + +class ::Google::Cloud::Dataplex::V1::DataScanService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_data_scan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_scan = {} + data_scan_id = "hello world" + validate_only = true + + create_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataScanRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataScan), request["data_scan"] + assert_equal "hello world", request["data_scan_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_scan parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_scan ::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_scan(::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_scan_client_stub.call_rpc_count + end + end + + def test_update_data_scan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + data_scan = {} + update_mask = {} + validate_only = true + + update_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataScan), request["data_scan"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_scan data_scan: data_scan, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_scan ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_scan(::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_scan_client_stub.call_rpc_count + end + end + + def test_delete_data_scan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_scan({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_scan name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_scan ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_scan({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_scan(::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_scan_client_stub.call_rpc_count + end + end + + def test_get_data_scan + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataScan.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DATA_SCAN_VIEW_UNSPECIFIED + + get_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataScanRequest, request + assert_equal "hello world", request["name"] + assert_equal :DATA_SCAN_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_scan({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_scan name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_scan ::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_scan({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_scan(::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_scan_client_stub.call_rpc_count + end + end + + def test_list_data_scans + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_scans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_scans, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataScansRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_scans_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_scans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_scans ::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_scans(::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_scans_client_stub.call_rpc_count + end + end + + def test_run_data_scan + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + run_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::RunDataScanRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_data_scan({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.run_data_scan name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.run_data_scan ::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.run_data_scan({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.run_data_scan(::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_data_scan_client_stub.call_rpc_count + end + end + + def test_get_data_scan_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataScanJob.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DATA_SCAN_JOB_VIEW_UNSPECIFIED + + get_data_scan_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_scan_job, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, request + assert_equal "hello world", request["name"] + assert_equal :DATA_SCAN_JOB_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_scan_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_scan_job({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_scan_job name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_scan_job ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_scan_job({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_scan_job(::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_scan_job_client_stub.call_rpc_count + end + end + + def test_list_data_scan_jobs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_data_scan_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_scan_jobs, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_scan_jobs_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_scan_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_scan_jobs ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_scan_jobs(::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_scan_jobs_client_stub.call_rpc_count + end + end + + def test_generate_data_quality_rules + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + generate_data_quality_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_data_quality_rules, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_data_quality_rules_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_data_quality_rules({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_data_quality_rules name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_data_quality_rules ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_data_quality_rules({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_data_quality_rules(::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_data_quality_rules_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb new file mode 100644 index 000000000000..7b371bd9a615 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb @@ -0,0 +1,389 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/data_taxonomy_pb" +require "google/cloud/dataplex/v1/data_taxonomy_services_pb" +require "google/cloud/dataplex/v1/data_taxonomy_service" + +class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb new file mode 100644 index 000000000000..c0e783bf9bf9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/data_taxonomy_service" + +class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_data_attribute_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_attribute_path project: "value0", location: "value1", dataTaxonomy: "value2", data_attribute_id: "value3" + assert_equal "projects/value0/locations/value1/dataTaxonomies/value2/attributes/value3", path + end + end + + def test_data_attribute_binding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_attribute_binding_path project: "value0", location: "value1", data_attribute_binding_id: "value2" + assert_equal "projects/value0/locations/value1/dataAttributeBindings/value2", path + end + end + + def test_data_taxonomy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_taxonomy_path project: "value0", location: "value1", data_taxonomy_id: "value2" + assert_equal "projects/value0/locations/value1/dataTaxonomies/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb new file mode 100644 index 000000000000..d010c1dfc5c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb @@ -0,0 +1,931 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/dataplex/v1/data_taxonomy_pb" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest" + + +class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_data_taxonomy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_taxonomy_id = "hello world" + data_taxonomy = {} + validate_only = true + + create_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_taxonomy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_taxonomy parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_taxonomy ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_taxonomy(::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_taxonomy_client_stub.call_count + end + end + end + + def test_update_data_taxonomy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_taxonomy = {} + validate_only = true + + update_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_taxonomy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_taxonomy update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_taxonomy ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_taxonomy(::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_taxonomy_client_stub.call_count + end + end + end + + def test_delete_data_taxonomy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_taxonomy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_taxonomy({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_taxonomy name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_taxonomy ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_taxonomy({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_taxonomy(::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_taxonomy_client_stub.call_count + end + end + end + + def test_list_data_taxonomies + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_taxonomies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_taxonomies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_taxonomies_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_taxonomies parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_taxonomies ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_taxonomies(::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_taxonomies_client_stub.call_count + end + end + end + + def test_get_data_taxonomy + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataTaxonomy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_taxonomy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_taxonomy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_taxonomy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_taxonomy ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_taxonomy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_taxonomy(::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_taxonomy_client_stub.call_count + end + end + end + + def test_create_data_attribute_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_attribute_binding_id = "hello world" + data_attribute_binding = {} + validate_only = true + + create_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_attribute_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_attribute_binding parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_attribute_binding ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_attribute_binding(::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_attribute_binding_client_stub.call_count + end + end + end + + def test_update_data_attribute_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_attribute_binding = {} + validate_only = true + + update_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_attribute_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_attribute_binding update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_attribute_binding ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_attribute_binding(::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_attribute_binding_client_stub.call_count + end + end + end + + def test_delete_data_attribute_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_attribute_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_attribute_binding({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_attribute_binding name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_attribute_binding ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_attribute_binding({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_attribute_binding(::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_attribute_binding_client_stub.call_count + end + end + end + + def test_list_data_attribute_bindings + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_attribute_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_attribute_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_attribute_bindings_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_attribute_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_attribute_bindings ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_attribute_bindings(::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_attribute_bindings_client_stub.call_count + end + end + end + + def test_get_data_attribute_binding + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_attribute_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_attribute_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_attribute_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_attribute_binding ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_attribute_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_attribute_binding(::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_attribute_binding_client_stub.call_count + end + end + end + + def test_create_data_attribute + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_attribute_id = "hello world" + data_attribute = {} + validate_only = true + + create_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_attribute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_attribute parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_attribute ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_attribute(::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_attribute_client_stub.call_count + end + end + end + + def test_update_data_attribute + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_attribute = {} + validate_only = true + + update_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_attribute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_attribute update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_attribute ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_attribute(::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_attribute_client_stub.call_count + end + end + end + + def test_delete_data_attribute + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_attribute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_attribute({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_attribute name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_attribute ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_attribute({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_attribute(::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_attribute_client_stub.call_count + end + end + end + + def test_list_data_attributes + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_attributes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_attributes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_attributes_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_attributes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_attributes ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_attributes(::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_attributes_client_stub.call_count + end + end + end + + def test_get_data_attribute + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataAttribute.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_attribute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_attribute({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_attribute name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_attribute ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_attribute({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_attribute(::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_attribute_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb new file mode 100644 index 000000000000..0a264bcd0072 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb @@ -0,0 +1,1080 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/data_taxonomy_pb" +require "google/cloud/dataplex/v1/data_taxonomy_services_pb" +require "google/cloud/dataplex/v1/data_taxonomy_service" + +class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_data_taxonomy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_taxonomy_id = "hello world" + data_taxonomy = {} + validate_only = true + + create_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_taxonomy, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_taxonomy_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataTaxonomy), request["data_taxonomy"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_taxonomy parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_taxonomy ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_taxonomy(::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_taxonomy_client_stub.call_rpc_count + end + end + + def test_update_data_taxonomy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_taxonomy = {} + validate_only = true + + update_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_taxonomy, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataTaxonomy), request["data_taxonomy"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_taxonomy update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_taxonomy ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_taxonomy(::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_taxonomy_client_stub.call_rpc_count + end + end + + def test_delete_data_taxonomy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_taxonomy, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_taxonomy({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_taxonomy name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_taxonomy ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_taxonomy({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_taxonomy(::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_taxonomy_client_stub.call_rpc_count + end + end + + def test_list_data_taxonomies + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_taxonomies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_taxonomies, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_taxonomies_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_taxonomies parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_taxonomies ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_taxonomies(::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_taxonomies_client_stub.call_rpc_count + end + end + + def test_get_data_taxonomy + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataTaxonomy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_taxonomy, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_taxonomy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_taxonomy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_taxonomy ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_taxonomy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_taxonomy(::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_taxonomy_client_stub.call_rpc_count + end + end + + def test_create_data_attribute_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_attribute_binding_id = "hello world" + data_attribute_binding = {} + validate_only = true + + create_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_attribute_binding, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_attribute_binding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttributeBinding), request["data_attribute_binding"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_attribute_binding parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_attribute_binding ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_attribute_binding(::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_attribute_binding_client_stub.call_rpc_count + end + end + + def test_update_data_attribute_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_attribute_binding = {} + validate_only = true + + update_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_attribute_binding, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttributeBinding), request["data_attribute_binding"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_attribute_binding update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_attribute_binding ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_attribute_binding(::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_attribute_binding_client_stub.call_rpc_count + end + end + + def test_delete_data_attribute_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_attribute_binding, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_attribute_binding({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_attribute_binding name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_attribute_binding ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_attribute_binding({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_attribute_binding(::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_attribute_binding_client_stub.call_rpc_count + end + end + + def test_list_data_attribute_bindings + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_attribute_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_attribute_bindings, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_attribute_bindings_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_attribute_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_attribute_bindings ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_attribute_bindings(::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_attribute_bindings_client_stub.call_rpc_count + end + end + + def test_get_data_attribute_binding + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_attribute_binding, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_attribute_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_attribute_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_attribute_binding ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_attribute_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_attribute_binding(::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_attribute_binding_client_stub.call_rpc_count + end + end + + def test_create_data_attribute + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_attribute_id = "hello world" + data_attribute = {} + validate_only = true + + create_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_attribute, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_attribute_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttribute), request["data_attribute"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_attribute parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_attribute ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_attribute(::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_attribute_client_stub.call_rpc_count + end + end + + def test_update_data_attribute + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_attribute = {} + validate_only = true + + update_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_attribute, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttribute), request["data_attribute"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_attribute update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_attribute ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_attribute(::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_attribute_client_stub.call_rpc_count + end + end + + def test_delete_data_attribute + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_attribute, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_attribute({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_attribute name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_attribute ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_attribute({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_attribute(::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_attribute_client_stub.call_rpc_count + end + end + + def test_list_data_attributes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_attributes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_attributes, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_attributes_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_attributes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_attributes ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_attributes(::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_attributes_client_stub.call_rpc_count + end + end + + def test_get_data_attribute + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataAttribute.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_attribute, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_attribute({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_attribute name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_attribute ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_attribute({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_attribute(::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_attribute_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb new file mode 100644 index 000000000000..99f73b424fa1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb @@ -0,0 +1,389 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/service_pb" +require "google/cloud/dataplex/v1/service_services_pb" +require "google/cloud/dataplex/v1/dataplex_service" + +class ::Google::Cloud::Dataplex::V1::DataplexService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb new file mode 100644 index 000000000000..24b850eb7d98 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb @@ -0,0 +1,119 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/dataplex_service" + +class ::Google::Cloud::Dataplex::V1::DataplexService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_asset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.asset_path project: "value0", location: "value1", lake: "value2", zone: "value3", asset: "value4" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/assets/value4", path + end + end + + def test_environment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.environment_path project: "value0", location: "value1", lake: "value2", environment: "value3" + assert_equal "projects/value0/locations/value1/lakes/value2/environments/value3", path + end + end + + def test_job_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.job_path project: "value0", location: "value1", lake: "value2", task: "value3", job: "value4" + assert_equal "projects/value0/locations/value1/lakes/value2/tasks/value3/jobs/value4", path + end + end + + def test_lake_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lake_path project: "value0", location: "value1", lake: "value2" + assert_equal "projects/value0/locations/value1/lakes/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_task_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.task_path project: "value0", location: "value1", lake: "value2", task: "value3" + assert_equal "projects/value0/locations/value1/lakes/value2/tasks/value3", path + end + end + + def test_zone_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.zone_path project: "value0", location: "value1", lake: "value2", zone: "value3" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb new file mode 100644 index 000000000000..c4dee6bbd6ed --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb @@ -0,0 +1,1931 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/dataplex/v1/service_pb" +require "google/cloud/dataplex/v1/dataplex_service/rest" + + +class ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_lake + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lake_id = "hello world" + lake = {} + validate_only = true + + create_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_lake_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_lake parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_lake ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_lake(::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_lake_client_stub.call_count + end + end + end + + def test_update_lake + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + lake = {} + validate_only = true + + update_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_lake_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_lake update_mask: update_mask, lake: lake, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_lake ::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_lake(::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_lake_client_stub.call_count + end + end + end + + def test_delete_lake + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_lake_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_lake({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_lake name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_lake ::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_lake({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_lake(::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_lake_client_stub.call_count + end + end + end + + def test_list_lakes + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListLakesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_lakes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_lakes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_lakes_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_lakes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_lakes ::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_lakes(::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_lakes_client_stub.call_count + end + end + end + + def test_get_lake + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Lake.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_lake_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_lake({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_lake name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_lake ::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_lake({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_lake(::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lake_client_stub.call_count + end + end + end + + def test_list_lake_actions + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_lake_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_lake_actions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_lake_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_lake_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_lake_actions ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_lake_actions(::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_lake_actions_client_stub.call_count + end + end + end + + def test_create_zone + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + zone_id = "hello world" + zone = {} + validate_only = true + + create_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_zone parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_zone ::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_zone(::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_zone_client_stub.call_count + end + end + end + + def test_update_zone + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + zone = {} + validate_only = true + + update_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_zone update_mask: update_mask, zone: zone, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_zone ::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_zone(::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_zone_client_stub.call_count + end + end + end + + def test_delete_zone + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_zone({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_zone name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_zone ::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_zone({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_zone(::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_zone_client_stub.call_count + end + end + end + + def test_list_zones + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListZonesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_zones_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_zones_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_zones_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_zones parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_zones ::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_zones(::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_zones_client_stub.call_count + end + end + end + + def test_get_zone + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Zone.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_zone({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_zone name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_zone ::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_zone({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_zone(::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_zone_client_stub.call_count + end + end + end + + def test_list_zone_actions + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_zone_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_zone_actions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_zone_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_zone_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_zone_actions ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_zone_actions(::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_zone_actions_client_stub.call_count + end + end + end + + def test_create_asset + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + asset_id = "hello world" + asset = {} + validate_only = true + + create_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_asset parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_asset ::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_asset(::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_asset_client_stub.call_count + end + end + end + + def test_update_asset + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + asset = {} + validate_only = true + + update_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_asset update_mask: update_mask, asset: asset, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_asset ::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_asset(::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_asset_client_stub.call_count + end + end + end + + def test_delete_asset + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_asset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_asset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_asset ::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_asset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_asset(::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_asset_client_stub.call_count + end + end + end + + def test_list_assets + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_assets ::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_assets(::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_count + end + end + end + + def test_get_asset + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Asset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_asset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_asset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_asset ::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_asset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_asset(::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_asset_client_stub.call_count + end + end + end + + def test_list_asset_actions + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_asset_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_asset_actions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_asset_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_asset_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_asset_actions ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_asset_actions(::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_asset_actions_client_stub.call_count + end + end + end + + def test_create_task + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + task_id = "hello world" + task = {} + validate_only = true + + create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_task parent: parent, task_id: task_id, task: task, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_task ::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_task(::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_task_client_stub.call_count + end + end + end + + def test_update_task + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + task = {} + validate_only = true + + update_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_task update_mask: update_mask, task: task, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_task ::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_task(::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_task_client_stub.call_count + end + end + end + + def test_delete_task + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_task({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_task name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_task ::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_task({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_task(::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_task_client_stub.call_count + end + end + end + + def test_list_tasks + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListTasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_tasks parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_tasks ::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_tasks(::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_tasks_client_stub.call_count + end + end + end + + def test_get_task + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_task({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_task name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_task ::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_task({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_task(::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_count + end + end + end + + def test_list_jobs + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListJobsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_jobs_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_jobs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_jobs ::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_jobs(::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_jobs_client_stub.call_count + end + end + end + + def test_run_task + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::RunTaskResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + labels = {} + args = {} + + run_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_run_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_task({ name: name, labels: labels, args: args }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_task name: name, labels: labels, args: args do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_task ::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_task({ name: name, labels: labels, args: args }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_task(::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_task_client_stub.call_count + end + end + end + + def test_get_job + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Job.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_job ::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_job(::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_job_client_stub.call_count + end + end + end + + def test_cancel_job + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_cancel_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, cancel_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.cancel_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.cancel_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.cancel_job ::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.cancel_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.cancel_job(::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, cancel_job_client_stub.call_count + end + end + end + + def test_create_environment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + environment_id = "hello world" + environment = {} + validate_only = true + + create_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_environment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_environment parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_environment ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_environment(::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_environment_client_stub.call_count + end + end + end + + def test_update_environment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + environment = {} + validate_only = true + + update_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_environment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_environment update_mask: update_mask, environment: environment, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_environment ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_environment(::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_environment_client_stub.call_count + end + end + end + + def test_delete_environment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_environment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_environment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_environment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_environment ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_environment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_environment(::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_environment_client_stub.call_count + end + end + end + + def test_list_environments + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_environments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_environments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_environments_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_environments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_environments ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_environments(::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_environments_client_stub.call_count + end + end + end + + def test_get_environment + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Environment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_environment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_environment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_environment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_environment ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_environment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_environment(::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_environment_client_stub.call_count + end + end + end + + def test_list_sessions + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListSessionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_sessions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_sessions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sessions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_sessions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_sessions ::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_sessions(::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_sessions_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb new file mode 100644 index 000000000000..7c667d2e90a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb @@ -0,0 +1,2245 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/service_pb" +require "google/cloud/dataplex/v1/service_services_pb" +require "google/cloud/dataplex/v1/dataplex_service" + +class ::Google::Cloud::Dataplex::V1::DataplexService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_lake + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lake_id = "hello world" + lake = {} + validate_only = true + + create_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_lake, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateLakeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["lake_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Lake), request["lake"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_lake parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_lake ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_lake(::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_lake_client_stub.call_rpc_count + end + end + + def test_update_lake + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + lake = {} + validate_only = true + + update_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_lake, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateLakeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Lake), request["lake"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_lake update_mask: update_mask, lake: lake, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_lake ::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_lake(::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_lake_client_stub.call_rpc_count + end + end + + def test_delete_lake + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_lake, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteLakeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_lake({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_lake name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_lake ::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_lake({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_lake(::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_lake_client_stub.call_rpc_count + end + end + + def test_list_lakes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListLakesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_lakes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_lakes, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListLakesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_lakes_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_lakes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_lakes ::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_lakes(::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_lakes_client_stub.call_rpc_count + end + end + + def test_get_lake + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Lake.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lake, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetLakeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_lake({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_lake name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_lake ::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_lake({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_lake(::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_lake_client_stub.call_rpc_count + end + end + + def test_list_lake_actions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_lake_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_lake_actions, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_lake_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_lake_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_lake_actions ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_lake_actions(::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_lake_actions_client_stub.call_rpc_count + end + end + + def test_create_zone + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + zone_id = "hello world" + zone = {} + validate_only = true + + create_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_zone, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateZoneRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["zone_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Zone), request["zone"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_zone parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_zone ::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_zone(::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_zone_client_stub.call_rpc_count + end + end + + def test_update_zone + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + zone = {} + validate_only = true + + update_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_zone, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateZoneRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Zone), request["zone"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_zone update_mask: update_mask, zone: zone, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_zone ::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_zone(::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_zone_client_stub.call_rpc_count + end + end + + def test_delete_zone + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_zone, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteZoneRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_zone({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_zone name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_zone ::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_zone({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_zone(::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_zone_client_stub.call_rpc_count + end + end + + def test_list_zones + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListZonesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_zones_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_zones, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListZonesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_zones_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_zones parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_zones ::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_zones(::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_zones_client_stub.call_rpc_count + end + end + + def test_get_zone + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Zone.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_zone, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetZoneRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_zone({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_zone name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_zone ::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_zone({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_zone(::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_zone_client_stub.call_rpc_count + end + end + + def test_list_zone_actions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_zone_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_zone_actions, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_zone_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_zone_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_zone_actions ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_zone_actions(::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_zone_actions_client_stub.call_rpc_count + end + end + + def test_create_asset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + asset_id = "hello world" + asset = {} + validate_only = true + + create_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateAssetRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["asset_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Asset), request["asset"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_asset parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_asset ::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_asset(::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_asset_client_stub.call_rpc_count + end + end + + def test_update_asset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + asset = {} + validate_only = true + + update_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateAssetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Asset), request["asset"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_asset update_mask: update_mask, asset: asset, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_asset ::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_asset(::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_asset_client_stub.call_rpc_count + end + end + + def test_delete_asset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteAssetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_asset({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_asset name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_asset ::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_asset({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_asset(::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_asset_client_stub.call_rpc_count + end + end + + def test_list_assets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_assets, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListAssetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_assets_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_assets ::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_assets(::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_rpc_count + end + end + + def test_get_asset + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Asset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetAssetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_asset({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_asset name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_asset ::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_asset({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_asset(::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_asset_client_stub.call_rpc_count + end + end + + def test_list_asset_actions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_asset_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_asset_actions, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_asset_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_asset_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_asset_actions ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_asset_actions(::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_asset_actions_client_stub.call_rpc_count + end + end + + def test_create_task + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + task_id = "hello world" + task = {} + validate_only = true + + create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateTaskRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["task_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Task), request["task"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_task parent: parent, task_id: task_id, task: task, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_task ::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_task(::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_task_client_stub.call_rpc_count + end + end + + def test_update_task + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + task = {} + validate_only = true + + update_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateTaskRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Task), request["task"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_task update_mask: update_mask, task: task, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_task ::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_task(::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_task_client_stub.call_rpc_count + end + end + + def test_delete_task + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteTaskRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_task({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_task name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_task ::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_task({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_task(::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_task_client_stub.call_rpc_count + end + end + + def test_list_tasks + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListTasksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tasks, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListTasksRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_tasks parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_tasks ::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_tasks(::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_tasks_client_stub.call_rpc_count + end + end + + def test_get_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetTaskRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_task({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_task name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_task ::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_task({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_task(::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_rpc_count + end + end + + def test_list_jobs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListJobsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_jobs, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListJobsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_jobs_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_jobs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_jobs ::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_jobs(::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_jobs_client_stub.call_rpc_count + end + end + + def test_run_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::RunTaskResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + labels = {} + args = {} + + run_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::RunTaskRequest, request + assert_equal "hello world", request["name"] + assert_equal({}, request["labels"].to_h) + assert_equal({}, request["args"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_task({ name: name, labels: labels, args: args }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.run_task name: name, labels: labels, args: args do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.run_task ::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.run_task({ name: name, labels: labels, args: args }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.run_task(::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_task_client_stub.call_rpc_count + end + end + + def test_get_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Job.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_job, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_job ::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_job(::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_job_client_stub.call_rpc_count + end + end + + def test_cancel_job + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_job, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CancelJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_job ::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_job(::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_job_client_stub.call_rpc_count + end + end + + def test_create_environment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + environment_id = "hello world" + environment = {} + validate_only = true + + create_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_environment, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["environment_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Environment), request["environment"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_environment parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_environment ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_environment(::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_environment_client_stub.call_rpc_count + end + end + + def test_update_environment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + environment = {} + validate_only = true + + update_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_environment, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Environment), request["environment"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_environment update_mask: update_mask, environment: environment, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_environment ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_environment(::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_environment_client_stub.call_rpc_count + end + end + + def test_delete_environment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_environment, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_environment({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_environment name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_environment ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_environment({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_environment(::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_environment_client_stub.call_rpc_count + end + end + + def test_list_environments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_environments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_environments, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_environments_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_environments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_environments ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_environments(::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_environments_client_stub.call_rpc_count + end + end + + def test_get_environment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Environment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_environment, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_environment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_environment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_environment ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_environment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_environment(::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_environment_client_stub.call_rpc_count + end + end + + def test_list_sessions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListSessionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_sessions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sessions, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListSessionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sessions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_sessions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_sessions ::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_sessions(::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_sessions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb new file mode 100644 index 000000000000..6d103094c6ef --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/metadata_service" + +class ::Google::Cloud::Dataplex::V1::MetadataService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_entity_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entity_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4", path + end + end + + def test_partition_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.partition_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4", partition: "value5" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4/partitions/value5", path + end + end + + def test_zone_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.zone_path project: "value0", location: "value1", lake: "value2", zone: "value3" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb new file mode 100644 index 000000000000..f39b65a77194 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb @@ -0,0 +1,592 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/dataplex/v1/metadata_pb" +require "google/cloud/dataplex/v1/metadata_service/rest" + + +class ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_entity + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entity = {} + validate_only = true + + create_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_create_entity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_entity parent: parent, entity: entity, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_entity ::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_entity(::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_entity_client_stub.call_count + end + end + end + + def test_update_entity + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + entity = {} + validate_only = true + + update_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_update_entity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_entity({ entity: entity, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_entity entity: entity, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_entity ::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_entity({ entity: entity, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_entity(::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_entity_client_stub.call_count + end + end + end + + def test_delete_entity + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_delete_entity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_entity({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_entity name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_entity ::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_entity({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_entity(::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_entity_client_stub.call_count + end + end + end + + def test_get_entity + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTITY_VIEW_UNSPECIFIED + + get_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_get_entity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_entity({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_entity name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_entity ::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_entity({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_entity(::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_entity_client_stub.call_count + end + end + end + + def test_list_entities + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + view = :ENTITY_VIEW_UNSPECIFIED + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_entities_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_list_entities_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_entities_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_entities parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_entities ::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_entities(::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_entities_client_stub.call_count + end + end + end + + def test_create_partition + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Partition.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + partition = {} + validate_only = true + + create_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_create_partition_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_partition parent: parent, partition: partition, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_partition ::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_partition(::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_partition_client_stub.call_count + end + end + end + + def test_delete_partition + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_delete_partition_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_partition({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_partition name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_partition ::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_partition({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_partition(::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_partition_client_stub.call_count + end + end + end + + def test_get_partition + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Partition.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_get_partition_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_partition({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_partition name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_partition ::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_partition({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_partition(::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_partition_client_stub.call_count + end + end + end + + def test_list_partitions + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_partitions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_list_partitions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_partitions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_partitions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_partitions ::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_partitions(::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_partitions_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb new file mode 100644 index 000000000000..7a3016ddfe7f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb @@ -0,0 +1,638 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/metadata_pb" +require "google/cloud/dataplex/v1/metadata_services_pb" +require "google/cloud/dataplex/v1/metadata_service" + +class ::Google::Cloud::Dataplex::V1::MetadataService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_entity + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entity = {} + validate_only = true + + create_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_entity, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntityRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entity), request["entity"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_entity parent: parent, entity: entity, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_entity ::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_entity(::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_entity_client_stub.call_rpc_count + end + end + + def test_update_entity + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + entity = {} + validate_only = true + + update_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_entity, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntityRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entity), request["entity"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_entity({ entity: entity, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_entity entity: entity, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_entity ::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_entity({ entity: entity, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_entity(::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_entity_client_stub.call_rpc_count + end + end + + def test_delete_entity + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_entity, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntityRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_entity({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_entity name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_entity ::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_entity({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_entity(::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_entity_client_stub.call_rpc_count + end + end + + def test_get_entity + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTITY_VIEW_UNSPECIFIED + + get_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_entity, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntityRequest, request + assert_equal "hello world", request["name"] + assert_equal :ENTITY_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_entity({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_entity name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_entity ::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_entity({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_entity(::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_entity_client_stub.call_rpc_count + end + end + + def test_list_entities + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + view = :ENTITY_VIEW_UNSPECIFIED + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_entities_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_entities, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntitiesRequest, request + assert_equal "hello world", request["parent"] + assert_equal :ENTITY_VIEW_UNSPECIFIED, request["view"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_entities_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_entities parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_entities ::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_entities(::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_entities_client_stub.call_rpc_count + end + end + + def test_create_partition + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Partition.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + partition = {} + validate_only = true + + create_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_partition, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreatePartitionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Partition), request["partition"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_partition parent: parent, partition: partition, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_partition ::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_partition(::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_partition_client_stub.call_rpc_count + end + end + + def test_delete_partition + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_partition, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeletePartitionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_partition({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_partition name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_partition ::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_partition({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_partition(::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_partition_client_stub.call_rpc_count + end + end + + def test_get_partition + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Partition.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_partition, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetPartitionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_partition({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_partition name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_partition ::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_partition({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_partition(::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_partition_client_stub.call_rpc_count + end + end + + def test_list_partitions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_partitions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_partitions, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListPartitionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_partitions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_partitions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_partitions ::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_partitions(::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_partitions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::MetadataService::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 297837a6ed88cf6adc05f7eac422efc616418137 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 2 May 2024 18:58:54 +0000 Subject: [PATCH 2/4] =?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/catalog_pb.rb | 2 +- .../dataplex/v1/catalog_service/client.rb | 12 +- .../v1/catalog_service/rest/client.rb | 12 +- .../cloud/dataplex/v1/data_quality_pb.rb | 3 +- .../lib/google/cloud/dataplex/v1/logs_pb.rb | 2 +- .../google/cloud/dataplex/v1/catalog.rb | 49 +- .../google/cloud/dataplex/v1/data_quality.rb | 29 + .../google/cloud/dataplex/v1/logs.rb | 8 + .../google-cloud-dataplex-v1/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-dataplex-v1/.rubocop.yml | 33 - .../google-cloud-dataplex-v1/.toys.rb | 28 - .../google-cloud-dataplex-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-dataplex-v1/CHANGELOG.md | 2 - .../google-cloud-dataplex-v1/Gemfile | 11 - .../google-cloud-dataplex-v1/LICENSE.md | 201 - .../google-cloud-dataplex-v1/README.md | 144 - .../google-cloud-dataplex-v1/Rakefile | 169 - .../gapic_metadata.json | 543 --- .../google-cloud-dataplex-v1.gemspec | 30 - .../lib/google-cloud-dataplex-v1.rb | 21 - .../lib/google/cloud/dataplex/v1.rb | 50 - .../google/cloud/dataplex/v1/analyze_pb.rb | 62 - .../cloud/dataplex/v1/bindings_override.rb | 423 -- .../google/cloud/dataplex/v1/catalog_pb.rb | 101 - .../cloud/dataplex/v1/catalog_service.rb | 60 - .../dataplex/v1/catalog_service/client.rb | 2797 ------------ .../v1/catalog_service/credentials.rb | 47 - .../dataplex/v1/catalog_service/operations.rb | 801 ---- .../dataplex/v1/catalog_service/paths.rb | 128 - .../cloud/dataplex/v1/catalog_service/rest.rb | 58 - .../v1/catalog_service/rest/client.rb | 2622 ----------- .../v1/catalog_service/rest/operations.rb | 895 ---- .../v1/catalog_service/rest/service_stub.rb | 1375 ------ .../cloud/dataplex/v1/catalog_services_pb.rb | 91 - .../google/cloud/dataplex/v1/content_pb.rb | 60 - .../cloud/dataplex/v1/content_service.rb | 55 - .../dataplex/v1/content_service/client.rb | 1204 ----- .../v1/content_service/credentials.rb | 47 - .../dataplex/v1/content_service/paths.rb | 73 - .../cloud/dataplex/v1/content_service/rest.rb | 53 - .../v1/content_service/rest/client.rb | 1131 ----- .../v1/content_service/rest/service_stub.rb | 605 --- .../cloud/dataplex/v1/content_services_pb.rb | 77 - .../cloud/dataplex/v1/data_profile_pb.rb | 60 - .../cloud/dataplex/v1/data_quality_pb.rb | 73 - .../cloud/dataplex/v1/data_scan_service.rb | 58 - .../dataplex/v1/data_scan_service/client.rb | 1329 ------ .../v1/data_scan_service/credentials.rb | 47 - .../v1/data_scan_service/operations.rb | 801 ---- .../dataplex/v1/data_scan_service/paths.rb | 113 - .../dataplex/v1/data_scan_service/rest.rb | 56 - .../v1/data_scan_service/rest/client.rb | 1248 ------ .../v1/data_scan_service/rest/operations.rb | 895 ---- .../v1/data_scan_service/rest/service_stub.rb | 612 --- .../cloud/dataplex/v1/data_taxonomy_pb.rb | 77 - .../dataplex/v1/data_taxonomy_service.rb | 57 - .../v1/data_taxonomy_service/client.rb | 1966 -------- .../v1/data_taxonomy_service/credentials.rb | 47 - .../v1/data_taxonomy_service/operations.rb | 801 ---- .../v1/data_taxonomy_service/paths.rb | 109 - .../dataplex/v1/data_taxonomy_service/rest.rb | 55 - .../v1/data_taxonomy_service/rest/client.rb | 1841 -------- .../data_taxonomy_service/rest/operations.rb | 895 ---- .../rest/service_stub.rb | 960 ---- .../dataplex/v1/data_taxonomy_services_pb.rb | 77 - .../cloud/dataplex/v1/dataplex_service.rb | 60 - .../dataplex/v1/dataplex_service/client.rb | 3950 ----------------- .../v1/dataplex_service/credentials.rb | 47 - .../v1/dataplex_service/operations.rb | 801 ---- .../dataplex/v1/dataplex_service/paths.rb | 178 - .../dataplex/v1/dataplex_service/rest.rb | 58 - .../v1/dataplex_service/rest/client.rb | 3700 --------------- .../v1/dataplex_service/rest/operations.rb | 895 ---- .../v1/dataplex_service/rest/service_stub.rb | 2028 --------- .../google/cloud/dataplex/v1/datascans_pb.rb | 81 - .../dataplex/v1/datascans_services_pb.rb | 63 - .../lib/google/cloud/dataplex/v1/logs_pb.rb | 84 - .../google/cloud/dataplex/v1/metadata_pb.rb | 82 - .../cloud/dataplex/v1/metadata_service.rb | 56 - .../dataplex/v1/metadata_service/client.rb | 1313 ------ .../v1/metadata_service/credentials.rb | 47 - .../dataplex/v1/metadata_service/paths.rb | 102 - .../dataplex/v1/metadata_service/rest.rb | 54 - .../v1/metadata_service/rest/client.rb | 1233 ----- .../v1/metadata_service/rest/service_stub.rb | 603 --- .../cloud/dataplex/v1/metadata_services_pb.rb | 62 - .../google/cloud/dataplex/v1/processing_pb.rb | 50 - .../google/cloud/dataplex/v1/resources_pb.rb | 87 - .../lib/google/cloud/dataplex/v1/rest.rb | 43 - .../google/cloud/dataplex/v1/security_pb.rb | 45 - .../google/cloud/dataplex/v1/service_pb.rb | 101 - .../cloud/dataplex/v1/service_services_pb.rb | 117 - .../lib/google/cloud/dataplex/v1/tasks_pb.rb | 64 - .../lib/google/cloud/dataplex/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 399 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 222 - .../google/cloud/dataplex/v1/analyze.rb | 290 -- .../google/cloud/dataplex/v1/catalog.rb | 1092 ----- .../google/cloud/dataplex/v1/content.rb | 142 - .../google/cloud/dataplex/v1/data_profile.rb | 321 -- .../google/cloud/dataplex/v1/data_quality.rb | 540 --- .../google/cloud/dataplex/v1/data_taxonomy.rb | 565 --- .../google/cloud/dataplex/v1/datascans.rb | 474 -- .../google/cloud/dataplex/v1/logs.rb | 814 ---- .../google/cloud/dataplex/v1/metadata.rb | 733 --- .../google/cloud/dataplex/v1/processing.rb | 106 - .../google/cloud/dataplex/v1/resources.rb | 838 ---- .../google/cloud/dataplex/v1/security.rb | 61 - .../google/cloud/dataplex/v1/service.rb | 803 ---- .../google/cloud/dataplex/v1/tasks.rb | 435 -- .../google/longrunning/operations.rb | 164 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/struct.rb | 96 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../google-cloud-dataplex-v1/snippets/Gemfile | 32 - .../catalog_service/create_aspect_type.rb | 54 - .../snippets/catalog_service/create_entry.rb | 47 - .../catalog_service/create_entry_group.rb | 54 - .../catalog_service/create_entry_type.rb | 54 - .../catalog_service/delete_aspect_type.rb | 54 - .../snippets/catalog_service/delete_entry.rb | 47 - .../catalog_service/delete_entry_group.rb | 54 - .../catalog_service/delete_entry_type.rb | 54 - .../catalog_service/get_aspect_type.rb | 47 - .../snippets/catalog_service/get_entry.rb | 47 - .../catalog_service/get_entry_group.rb | 47 - .../catalog_service/get_entry_type.rb | 47 - .../catalog_service/list_aspect_types.rb | 51 - .../snippets/catalog_service/list_entries.rb | 51 - .../catalog_service/list_entry_groups.rb | 51 - .../catalog_service/list_entry_types.rb | 51 - .../snippets/catalog_service/lookup_entry.rb | 47 - .../catalog_service/search_entries.rb | 51 - .../catalog_service/update_aspect_type.rb | 54 - .../snippets/catalog_service/update_entry.rb | 47 - .../catalog_service/update_entry_group.rb | 54 - .../catalog_service/update_entry_type.rb | 54 - .../content_service/create_content.rb | 47 - .../content_service/delete_content.rb | 47 - .../snippets/content_service/get_content.rb | 47 - .../content_service/get_iam_policy.rb | 47 - .../snippets/content_service/list_content.rb | 51 - .../content_service/set_iam_policy.rb | 47 - .../content_service/test_iam_permissions.rb | 47 - .../content_service/update_content.rb | 47 - .../data_scan_service/create_data_scan.rb | 54 - .../data_scan_service/delete_data_scan.rb | 54 - .../generate_data_quality_rules.rb | 47 - .../data_scan_service/get_data_scan.rb | 47 - .../data_scan_service/get_data_scan_job.rb | 47 - .../data_scan_service/list_data_scan_jobs.rb | 51 - .../data_scan_service/list_data_scans.rb | 51 - .../data_scan_service/run_data_scan.rb | 47 - .../data_scan_service/update_data_scan.rb | 54 - .../create_data_attribute.rb | 54 - .../create_data_attribute_binding.rb | 54 - .../create_data_taxonomy.rb | 54 - .../delete_data_attribute.rb | 54 - .../delete_data_attribute_binding.rb | 54 - .../delete_data_taxonomy.rb | 54 - .../get_data_attribute.rb | 47 - .../get_data_attribute_binding.rb | 47 - .../get_data_taxonomy.rb | 47 - .../list_data_attribute_bindings.rb | 51 - .../list_data_attributes.rb | 51 - .../list_data_taxonomies.rb | 51 - .../update_data_attribute.rb | 54 - .../update_data_attribute_binding.rb | 54 - .../update_data_taxonomy.rb | 54 - .../snippets/dataplex_service/cancel_job.rb | 47 - .../snippets/dataplex_service/create_asset.rb | 54 - .../dataplex_service/create_environment.rb | 54 - .../snippets/dataplex_service/create_lake.rb | 54 - .../snippets/dataplex_service/create_task.rb | 54 - .../snippets/dataplex_service/create_zone.rb | 54 - .../snippets/dataplex_service/delete_asset.rb | 54 - .../dataplex_service/delete_environment.rb | 54 - .../snippets/dataplex_service/delete_lake.rb | 54 - .../snippets/dataplex_service/delete_task.rb | 54 - .../snippets/dataplex_service/delete_zone.rb | 54 - .../snippets/dataplex_service/get_asset.rb | 47 - .../dataplex_service/get_environment.rb | 47 - .../snippets/dataplex_service/get_job.rb | 47 - .../snippets/dataplex_service/get_lake.rb | 47 - .../snippets/dataplex_service/get_task.rb | 47 - .../snippets/dataplex_service/get_zone.rb | 47 - .../dataplex_service/list_asset_actions.rb | 51 - .../snippets/dataplex_service/list_assets.rb | 51 - .../dataplex_service/list_environments.rb | 51 - .../snippets/dataplex_service/list_jobs.rb | 51 - .../dataplex_service/list_lake_actions.rb | 51 - .../snippets/dataplex_service/list_lakes.rb | 51 - .../dataplex_service/list_sessions.rb | 51 - .../snippets/dataplex_service/list_tasks.rb | 51 - .../dataplex_service/list_zone_actions.rb | 51 - .../snippets/dataplex_service/list_zones.rb | 51 - .../snippets/dataplex_service/run_task.rb | 47 - .../snippets/dataplex_service/update_asset.rb | 54 - .../dataplex_service/update_environment.rb | 54 - .../snippets/dataplex_service/update_lake.rb | 54 - .../snippets/dataplex_service/update_task.rb | 54 - .../snippets/dataplex_service/update_zone.rb | 54 - .../metadata_service/create_entity.rb | 47 - .../metadata_service/create_partition.rb | 47 - .../metadata_service/delete_entity.rb | 47 - .../metadata_service/delete_partition.rb | 47 - .../snippets/metadata_service/get_entity.rb | 47 - .../metadata_service/get_partition.rb | 47 - .../metadata_service/list_entities.rb | 51 - .../metadata_service/list_partitions.rb | 51 - .../metadata_service/update_entity.rb | 47 - ...pet_metadata_google.cloud.dataplex.v1.json | 3855 ---------------- .../v1/catalog_service_operations_test.rb | 389 -- .../dataplex/v1/catalog_service_paths_test.rb | 95 - .../dataplex/v1/catalog_service_rest_test.rb | 1330 ------ .../cloud/dataplex/v1/catalog_service_test.rb | 1538 ------- .../dataplex/v1/content_service_paths_test.rb | 59 - .../dataplex/v1/content_service_rest_test.rb | 535 --- .../cloud/dataplex/v1/content_service_test.rb | 569 --- .../v1/data_scan_service_operations_test.rb | 389 -- .../v1/data_scan_service_paths_test.rb | 83 - .../v1/data_scan_service_rest_test.rb | 591 --- .../dataplex/v1/data_scan_service_test.rb | 665 --- .../data_taxonomy_service_operations_test.rb | 389 -- .../v1/data_taxonomy_service_paths_test.rb | 83 - .../v1/data_taxonomy_service_rest_test.rb | 931 ---- .../dataplex/v1/data_taxonomy_service_test.rb | 1080 ----- .../v1/dataplex_service_operations_test.rb | 389 -- .../v1/dataplex_service_paths_test.rb | 119 - .../dataplex/v1/dataplex_service_rest_test.rb | 1931 -------- .../dataplex/v1/dataplex_service_test.rb | 2245 ---------- .../v1/metadata_service_paths_test.rb | 71 - .../dataplex/v1/metadata_service_rest_test.rb | 592 --- .../dataplex/v1/metadata_service_test.rb | 638 --- .../google-cloud-dataplex-v1/test/helper.rb | 25 - 245 files changed, 68 insertions(+), 74918 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb index 2bd5c7bfae14..a3ce27a01b7e 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb @@ -16,7 +16,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n&google/cloud/dataplex/v1/catalog.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd3\r\n\nAspectType\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.AspectType.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12N\n\rauthorization\x18\x34 \x01(\x0b\x32\x32.google.cloud.dataplex.v1.AspectType.AuthorizationB\x03\xe0\x41\x05\x12U\n\x11metadata_template\x18\x35 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x02\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a\xa4\x07\n\x10MetadataTemplate\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12Q\n\rrecord_fields\x18\x06 \x03(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12Y\n\x0b\x65num_values\x18\x08 \x03(\x0b\x32?.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValueB\x03\xe0\x41\x01\x12M\n\tmap_items\x18\n \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12O\n\x0b\x61rray_items\x18\x0b \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12\x14\n\x07type_id\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08type_ref\x18\r \x01(\tB\x03\xe0\x41\x01\x12[\n\x0b\x63onstraints\x18\x32 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.ConstraintsB\x03\xe0\x41\x01\x12[\n\x0b\x61nnotations\x18\x33 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.AnnotationsB\x03\xe0\x41\x01\x1aK\n\tEnumValue\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ndeprecated\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0b\x43onstraints\x12\x15\n\x08required\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xad\x01\n\x0b\x41nnotations\x12\x17\n\ndeprecated\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdisplay_order\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bstring_type\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rstring_values\x18\x07 \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/AspectType\x12\x41projects/{project}/locations/{location}/aspectTypes/{aspect_type}*\x0b\x61spectTypes2\naspectType\"\xcd\x04\n\nEntryGroup\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.EntryGroup.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/EntryGroup\x12\x41projects/{project}/locations/{location}/entryGroups/{entry_group}*\x0b\x65ntryGroups2\nentryGroup\"\xdc\x06\n\tEntryType\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x06labels\x18\x07 \x03(\x0b\x32/.google.cloud.dataplex.v1.EntryType.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0ctype_aliases\x18\t \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08platform\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06system\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12H\n\x10required_aspects\x18\x32 \x03(\x0b\x32..google.cloud.dataplex.v1.EntryType.AspectInfo\x12M\n\rauthorization\x18\x33 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.EntryType.AuthorizationB\x03\xe0\x41\x05\x1a\x43\n\nAspectInfo\x12\x35\n\x04type\x18\x01 \x01(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:~\xea\x41{\n!dataplex.googleapis.com/EntryType\x12?projects/{project}/locations/{location}/entryTypes/{entry_type}*\nentryTypes2\tentryType\"\x91\x02\n\x06\x41spect\x12\x18\n\x0b\x61spect_type\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12*\n\x04\x64\x61ta\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\x12\x42\n\raspect_source\x18\t \x01(\x0b\x32&.google.cloud.dataplex.v1.AspectSourceB\x03\xe0\x41\x01\"p\n\x0c\x41spectSource\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc4\x04\n\x05\x45ntry\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\nentry_type\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07\x61spects\x18\t \x03(\x0b\x32,.google.cloud.dataplex.v1.Entry.AspectsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0cparent_entry\x18\n \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05\x12!\n\x14\x66ully_qualified_name\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12@\n\x0c\x65ntry_source\x18\x0f \x01(\x0b\x32%.google.cloud.dataplex.v1.EntrySourceB\x03\xe0\x41\x01\x1aP\n\x0c\x41spectsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .google.cloud.dataplex.v1.Aspect:\x02\x38\x01:\x86\x01\xea\x41\x82\x01\n\x1d\x64\x61taplex.googleapis.com/Entry\x12Qprojects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}*\x07\x65ntries2\x05\x65ntry\"\xba\x03\n\x0b\x45ntrySource\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x0e\n\x06system\x18\x02 \x01(\t\x12\x10\n\x08platform\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x41\n\x06labels\x18\x07 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.EntrySource.LabelsEntry\x12\x46\n\tancestors\x18\t \x03(\x0b\x32..google.cloud.dataplex.v1.EntrySource.AncestorB\x03\xe0\x41\x05\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x30\n\x08\x41ncestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xcd\x01\n\x17\x43reateEntryGroupRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x65ntry_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x65ntry_group\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateEntryGroupRequest\x12>\n\x0b\x65ntry_group\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListEntryGroupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListEntryGroupsResponse\x12:\n\x0c\x65ntry_groups\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.EntryGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\"\xc9\x01\n\x16\x43reateEntryTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1a\n\rentry_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\nentry_type\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x16UpdateEntryTypeRequest\x12<\n\nentry_type\x18\x01 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"d\n\x16\x44\x65leteEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n\x15ListEntryTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x16ListEntryTypesResponse\x12\x38\n\x0b\x65ntry_types\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.EntryType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"N\n\x13GetEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\"\xcd\x01\n\x17\x43reateAspectTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x61spect_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x61spect_type\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateAspectTypeRequest\x12>\n\x0b\x61spect_type\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListAspectTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListAspectTypesResponse\x12:\n\x0c\x61spect_types\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.AspectType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\"\x9c\x01\n\x12\x43reateEntryRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x15\n\x08\x65ntry_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x05\x65ntry\x18\x03 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\"\xda\x01\n\x12UpdateEntryRequest\x12\x33\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16\x64\x65lete_missing_aspects\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x61spect_keys\x18\x05 \x03(\tB\x03\xe0\x41\x01\"I\n\x12\x44\x65leteEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\x96\x01\n\x12ListEntriesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"`\n\x13ListEntriesResponse\x12\x30\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n\x0fGetEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\"\xc4\x01\n\x12LookupEntryRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x34\n\x05\x65ntry\x18\x05 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\x99\x01\n\x14SearchEntriesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05scope\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\xca\x03\n\x13SearchEntriesResult\x12\x11\n\x05\x65ntry\x18\x01 \x01(\tB\x02\x18\x01\x12\x18\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x02\x18\x01\x12\x16\n\nentry_type\x18\x03 \x01(\tB\x02\x18\x01\x12\x33\n\x0bmodify_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12 \n\x14\x66ully_qualified_name\x18\x05 \x01(\tB\x02\x18\x01\x12\x17\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x02\x18\x01\x12\x1d\n\x11relative_resource\x18\x07 \x01(\tB\x02\x18\x01\x12\x17\n\x0flinked_resource\x18\x08 \x01(\t\x12\x37\n\x0e\x64\x61taplex_entry\x18\t \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12H\n\x08snippets\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.SearchEntriesResult.Snippets\x1a\x43\n\x08Snippets\x12\x37\n\x0e\x64\x61taplex_entry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\"\x99\x01\n\x15SearchEntriesResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32-.google.cloud.dataplex.v1.SearchEntriesResult\x12\x12\n\ntotal_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x13\n\x0bunreachable\x18\x04 \x03(\t*Q\n\tEntryView\x12\x1a\n\x16\x45NTRY_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\x12\x07\n\x03\x41LL\x10\x04*p\n\x0eTransferStatus\x12\x1f\n\x1bTRANSFER_STATUS_UNSPECIFIED\x10\x00\x12\x1c\n\x18TRANSFER_STATUS_MIGRATED\x10\x01\x12\x1f\n\x1bTRANSFER_STATUS_TRANSFERRED\x10\x02\x32\x82#\n\x0e\x43\x61talogService\x12\xea\x01\n\x0f\x43reateEntryType\x12\x30.google.cloud.dataplex.v1.CreateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x1fparent,entry_type,entry_type_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/entryTypes:\nentry_type\x12\xec\x01\n\x0fUpdateEntryType\x12\x30.google.cloud.dataplex.v1.UpdateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x16\x65ntry_type,update_mask\x82\xd3\xe4\x93\x02G29/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}:\nentry_type\x12\xce\x01\n\x0f\x44\x65leteEntryType\x12\x30.google.cloud.dataplex.v1.DeleteEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xb4\x01\n\x0eListEntryTypes\x12/.google.cloud.dataplex.v1.ListEntryTypesRequest\x1a\x30.google.cloud.dataplex.v1.ListEntryTypesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/entryTypes\x12\xa1\x01\n\x0cGetEntryType\x12-.google.cloud.dataplex.v1.GetEntryTypeRequest\x1a#.google.cloud.dataplex.v1.EntryType\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xf1\x01\n\x10\x43reateAspectType\x12\x31.google.cloud.dataplex.v1.CreateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41!parent,aspect_type,aspect_type_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/aspectTypes:\x0b\x61spect_type\x12\xf3\x01\n\x10UpdateAspectType\x12\x31.google.cloud.dataplex.v1.UpdateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41\x17\x61spect_type,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}:\x0b\x61spect_type\x12\xd1\x01\n\x10\x44\x65leteAspectType\x12\x31.google.cloud.dataplex.v1.DeleteAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xb8\x01\n\x0fListAspectTypes\x12\x30.google.cloud.dataplex.v1.ListAspectTypesRequest\x1a\x31.google.cloud.dataplex.v1.ListAspectTypesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/aspectTypes\x12\xa5\x01\n\rGetAspectType\x12..google.cloud.dataplex.v1.GetAspectTypeRequest\x1a$.google.cloud.dataplex.v1.AspectType\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xf1\x01\n\x10\x43reateEntryGroup\x12\x31.google.cloud.dataplex.v1.CreateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41!parent,entry_group,entry_group_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/entryGroups:\x0b\x65ntry_group\x12\xf3\x01\n\x10UpdateEntryGroup\x12\x31.google.cloud.dataplex.v1.UpdateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41\x17\x65ntry_group,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}:\x0b\x65ntry_group\x12\xd1\x01\n\x10\x44\x65leteEntryGroup\x12\x31.google.cloud.dataplex.v1.DeleteEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xb8\x01\n\x0fListEntryGroups\x12\x30.google.cloud.dataplex.v1.ListEntryGroupsRequest\x1a\x31.google.cloud.dataplex.v1.ListEntryGroupsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/entryGroups\x12\xa5\x01\n\rGetEntryGroup\x12..google.cloud.dataplex.v1.GetEntryGroupRequest\x1a$.google.cloud.dataplex.v1.EntryGroup\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xbe\x01\n\x0b\x43reateEntry\x12,.google.cloud.dataplex.v1.CreateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"`\xda\x41\x15parent,entry,entry_id\x82\xd3\xe4\x93\x02\x42\"9/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:\x05\x65ntry\x12\xc1\x01\n\x0bUpdateEntry\x12,.google.cloud.dataplex.v1.UpdateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"c\xda\x41\x11\x65ntry,update_mask\x82\xd3\xe4\x93\x02I2@/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/**}:\x05\x65ntry\x12\xa7\x01\n\x0b\x44\x65leteEntry\x12,.google.cloud.dataplex.v1.DeleteEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\xb6\x01\n\x0bListEntries\x12,.google.cloud.dataplex.v1.ListEntriesRequest\x1a-.google.cloud.dataplex.v1.ListEntriesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/entryGroups/*}/entries\x12\xa1\x01\n\x08GetEntry\x12).google.cloud.dataplex.v1.GetEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\x93\x01\n\x0bLookupEntry\x12,.google.cloud.dataplex.v1.LookupEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*}:lookupEntry\x12\xb6\x01\n\rSearchEntries\x12..google.cloud.dataplex.v1.SearchEntriesRequest\x1a/.google.cloud.dataplex.v1.SearchEntriesResponse\"D\xda\x41\nname,query\x82\xd3\xe4\x93\x02\x31\"//v1/{name=projects/*/locations/*}:searchEntries\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbc\x01\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x43\x61talogProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xaa\x02\x18Google.Cloud.Dataplex.V1\xca\x02\x18Google\\Cloud\\Dataplex\\V1\xea\x02\x1bGoogle::Cloud::Dataplex::V1b\x06proto3" +descriptor_data = "\n&google/cloud/dataplex/v1/catalog.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd3\r\n\nAspectType\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.AspectType.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12N\n\rauthorization\x18\x34 \x01(\x0b\x32\x32.google.cloud.dataplex.v1.AspectType.AuthorizationB\x03\xe0\x41\x05\x12U\n\x11metadata_template\x18\x35 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x02\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a\xa4\x07\n\x10MetadataTemplate\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12Q\n\rrecord_fields\x18\x06 \x03(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12Y\n\x0b\x65num_values\x18\x08 \x03(\x0b\x32?.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValueB\x03\xe0\x41\x01\x12M\n\tmap_items\x18\n \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12O\n\x0b\x61rray_items\x18\x0b \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12\x14\n\x07type_id\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08type_ref\x18\r \x01(\tB\x03\xe0\x41\x01\x12[\n\x0b\x63onstraints\x18\x32 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.ConstraintsB\x03\xe0\x41\x01\x12[\n\x0b\x61nnotations\x18\x33 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.AnnotationsB\x03\xe0\x41\x01\x1aK\n\tEnumValue\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ndeprecated\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0b\x43onstraints\x12\x15\n\x08required\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xad\x01\n\x0b\x41nnotations\x12\x17\n\ndeprecated\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdisplay_order\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bstring_type\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rstring_values\x18\x07 \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/AspectType\x12\x41projects/{project}/locations/{location}/aspectTypes/{aspect_type}*\x0b\x61spectTypes2\naspectType\"\xcd\x04\n\nEntryGroup\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.EntryGroup.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/EntryGroup\x12\x41projects/{project}/locations/{location}/entryGroups/{entry_group}*\x0b\x65ntryGroups2\nentryGroup\"\xdc\x06\n\tEntryType\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x06labels\x18\x07 \x03(\x0b\x32/.google.cloud.dataplex.v1.EntryType.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0ctype_aliases\x18\t \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08platform\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06system\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12H\n\x10required_aspects\x18\x32 \x03(\x0b\x32..google.cloud.dataplex.v1.EntryType.AspectInfo\x12M\n\rauthorization\x18\x33 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.EntryType.AuthorizationB\x03\xe0\x41\x05\x1a\x43\n\nAspectInfo\x12\x35\n\x04type\x18\x01 \x01(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:~\xea\x41{\n!dataplex.googleapis.com/EntryType\x12?projects/{project}/locations/{location}/entryTypes/{entry_type}*\nentryTypes2\tentryType\"\x91\x02\n\x06\x41spect\x12\x18\n\x0b\x61spect_type\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12*\n\x04\x64\x61ta\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\x12\x42\n\raspect_source\x18\t \x01(\x0b\x32&.google.cloud.dataplex.v1.AspectSourceB\x03\xe0\x41\x01\"p\n\x0c\x41spectSource\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc4\x04\n\x05\x45ntry\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\nentry_type\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07\x61spects\x18\t \x03(\x0b\x32,.google.cloud.dataplex.v1.Entry.AspectsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0cparent_entry\x18\n \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05\x12!\n\x14\x66ully_qualified_name\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12@\n\x0c\x65ntry_source\x18\x0f \x01(\x0b\x32%.google.cloud.dataplex.v1.EntrySourceB\x03\xe0\x41\x01\x1aP\n\x0c\x41spectsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .google.cloud.dataplex.v1.Aspect:\x02\x38\x01:\x86\x01\xea\x41\x82\x01\n\x1d\x64\x61taplex.googleapis.com/Entry\x12Qprojects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}*\x07\x65ntries2\x05\x65ntry\"\xba\x03\n\x0b\x45ntrySource\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x0e\n\x06system\x18\x02 \x01(\t\x12\x10\n\x08platform\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x41\n\x06labels\x18\x07 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.EntrySource.LabelsEntry\x12\x46\n\tancestors\x18\t \x03(\x0b\x32..google.cloud.dataplex.v1.EntrySource.AncestorB\x03\xe0\x41\x05\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x30\n\x08\x41ncestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xcd\x01\n\x17\x43reateEntryGroupRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x65ntry_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x65ntry_group\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateEntryGroupRequest\x12>\n\x0b\x65ntry_group\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListEntryGroupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListEntryGroupsResponse\x12:\n\x0c\x65ntry_groups\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.EntryGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\"\xc9\x01\n\x16\x43reateEntryTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1a\n\rentry_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\nentry_type\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x16UpdateEntryTypeRequest\x12<\n\nentry_type\x18\x01 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"d\n\x16\x44\x65leteEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n\x15ListEntryTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x16ListEntryTypesResponse\x12\x38\n\x0b\x65ntry_types\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.EntryType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"N\n\x13GetEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\"\xcd\x01\n\x17\x43reateAspectTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x61spect_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x61spect_type\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateAspectTypeRequest\x12>\n\x0b\x61spect_type\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListAspectTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListAspectTypesResponse\x12:\n\x0c\x61spect_types\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.AspectType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\"\x9c\x01\n\x12\x43reateEntryRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x15\n\x08\x65ntry_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x05\x65ntry\x18\x03 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\"\xda\x01\n\x12UpdateEntryRequest\x12\x33\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16\x64\x65lete_missing_aspects\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x61spect_keys\x18\x05 \x03(\tB\x03\xe0\x41\x01\"I\n\x12\x44\x65leteEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\x96\x01\n\x12ListEntriesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"`\n\x13ListEntriesResponse\x12\x30\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n\x0fGetEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\"\xc4\x01\n\x12LookupEntryRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x34\n\x05\x65ntry\x18\x05 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\x99\x01\n\x14SearchEntriesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05scope\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\xf6\x01\n\x13SearchEntriesResult\x12\x17\n\x0flinked_resource\x18\x08 \x01(\t\x12\x37\n\x0e\x64\x61taplex_entry\x18\t \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12H\n\x08snippets\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.SearchEntriesResult.Snippets\x1a\x43\n\x08Snippets\x12\x37\n\x0e\x64\x61taplex_entry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\"\x99\x01\n\x15SearchEntriesResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32-.google.cloud.dataplex.v1.SearchEntriesResult\x12\x12\n\ntotal_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x13\n\x0bunreachable\x18\x04 \x03(\t*Q\n\tEntryView\x12\x1a\n\x16\x45NTRY_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\x12\x07\n\x03\x41LL\x10\x04*p\n\x0eTransferStatus\x12\x1f\n\x1bTRANSFER_STATUS_UNSPECIFIED\x10\x00\x12\x1c\n\x18TRANSFER_STATUS_MIGRATED\x10\x01\x12\x1f\n\x1bTRANSFER_STATUS_TRANSFERRED\x10\x02\x32\x82#\n\x0e\x43\x61talogService\x12\xea\x01\n\x0f\x43reateEntryType\x12\x30.google.cloud.dataplex.v1.CreateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x1fparent,entry_type,entry_type_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/entryTypes:\nentry_type\x12\xec\x01\n\x0fUpdateEntryType\x12\x30.google.cloud.dataplex.v1.UpdateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x16\x65ntry_type,update_mask\x82\xd3\xe4\x93\x02G29/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}:\nentry_type\x12\xce\x01\n\x0f\x44\x65leteEntryType\x12\x30.google.cloud.dataplex.v1.DeleteEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xb4\x01\n\x0eListEntryTypes\x12/.google.cloud.dataplex.v1.ListEntryTypesRequest\x1a\x30.google.cloud.dataplex.v1.ListEntryTypesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/entryTypes\x12\xa1\x01\n\x0cGetEntryType\x12-.google.cloud.dataplex.v1.GetEntryTypeRequest\x1a#.google.cloud.dataplex.v1.EntryType\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xf1\x01\n\x10\x43reateAspectType\x12\x31.google.cloud.dataplex.v1.CreateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41!parent,aspect_type,aspect_type_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/aspectTypes:\x0b\x61spect_type\x12\xf3\x01\n\x10UpdateAspectType\x12\x31.google.cloud.dataplex.v1.UpdateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41\x17\x61spect_type,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}:\x0b\x61spect_type\x12\xd1\x01\n\x10\x44\x65leteAspectType\x12\x31.google.cloud.dataplex.v1.DeleteAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xb8\x01\n\x0fListAspectTypes\x12\x30.google.cloud.dataplex.v1.ListAspectTypesRequest\x1a\x31.google.cloud.dataplex.v1.ListAspectTypesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/aspectTypes\x12\xa5\x01\n\rGetAspectType\x12..google.cloud.dataplex.v1.GetAspectTypeRequest\x1a$.google.cloud.dataplex.v1.AspectType\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xf1\x01\n\x10\x43reateEntryGroup\x12\x31.google.cloud.dataplex.v1.CreateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41!parent,entry_group,entry_group_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/entryGroups:\x0b\x65ntry_group\x12\xf3\x01\n\x10UpdateEntryGroup\x12\x31.google.cloud.dataplex.v1.UpdateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41\x17\x65ntry_group,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}:\x0b\x65ntry_group\x12\xd1\x01\n\x10\x44\x65leteEntryGroup\x12\x31.google.cloud.dataplex.v1.DeleteEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xb8\x01\n\x0fListEntryGroups\x12\x30.google.cloud.dataplex.v1.ListEntryGroupsRequest\x1a\x31.google.cloud.dataplex.v1.ListEntryGroupsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/entryGroups\x12\xa5\x01\n\rGetEntryGroup\x12..google.cloud.dataplex.v1.GetEntryGroupRequest\x1a$.google.cloud.dataplex.v1.EntryGroup\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xbe\x01\n\x0b\x43reateEntry\x12,.google.cloud.dataplex.v1.CreateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"`\xda\x41\x15parent,entry,entry_id\x82\xd3\xe4\x93\x02\x42\"9/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:\x05\x65ntry\x12\xc1\x01\n\x0bUpdateEntry\x12,.google.cloud.dataplex.v1.UpdateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"c\xda\x41\x11\x65ntry,update_mask\x82\xd3\xe4\x93\x02I2@/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/**}:\x05\x65ntry\x12\xa7\x01\n\x0b\x44\x65leteEntry\x12,.google.cloud.dataplex.v1.DeleteEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\xb6\x01\n\x0bListEntries\x12,.google.cloud.dataplex.v1.ListEntriesRequest\x1a-.google.cloud.dataplex.v1.ListEntriesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/entryGroups/*}/entries\x12\xa1\x01\n\x08GetEntry\x12).google.cloud.dataplex.v1.GetEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\x93\x01\n\x0bLookupEntry\x12,.google.cloud.dataplex.v1.LookupEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*}:lookupEntry\x12\xb6\x01\n\rSearchEntries\x12..google.cloud.dataplex.v1.SearchEntriesRequest\x1a/.google.cloud.dataplex.v1.SearchEntriesResponse\"D\xda\x41\nname,query\x82\xd3\xe4\x93\x02\x31\"//v1/{name=projects/*/locations/*}:searchEntries\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbc\x01\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x43\x61talogProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xaa\x02\x18Google.Cloud.Dataplex.V1\xca\x02\x18Google\\Cloud\\Dataplex\\V1\xea\x02\x1bGoogle::Cloud::Dataplex::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb index d83ee747ea94..7a7b990936b5 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb @@ -2099,15 +2099,17 @@ def delete_entry request, options = nil # Optional. A filter on the entries to return. # Filters are case-sensitive. # The request can be filtered by the following fields: - # entry_type, display_name. + # 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. Example filter expressions: - # "display_name=AnExampleDisplayName" + # 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/a* OR "entry_type=projects/k*" - # "NOT display_name=AnotherExampleDisplayName" + # "entry_type=projects/example-project/locations/us/entryTypes/a* OR + # entry_type=projects/another-project/locations/*" + # "NOT entry_source.display_name=AnotherExampleDisplayName" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb index 0835f11ebce0..398eb9db3daa 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb @@ -1965,15 +1965,17 @@ def delete_entry request, options = nil # Optional. A filter on the entries to return. # Filters are case-sensitive. # The request can be filtered by the following fields: - # entry_type, display_name. + # 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. Example filter expressions: - # "display_name=AnExampleDisplayName" + # 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/a* OR "entry_type=projects/k*" - # "NOT display_name=AnotherExampleDisplayName" + # "entry_type=projects/example-project/locations/us/entryTypes/a* OR + # entry_type=projects/another-project/locations/*" + # "NOT entry_source.display_name=AnotherExampleDisplayName" # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb index 32831275116d..57d9d4786491 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb @@ -9,7 +9,7 @@ require 'google/cloud/dataplex/v1/processing_pb' -descriptor_data = "\n+google/cloud/dataplex/v1/data_quality.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/dataplex/v1/processing.proto\"\xc0\x08\n\x0f\x44\x61taQualitySpec\x12=\n\x05rules\x18\x01 \x03(\x0b\x32).google.cloud.dataplex.v1.DataQualityRuleB\x03\xe0\x41\x02\x12\x1d\n\x10sampling_percent\x18\x04 \x01(\x02\x42\x03\xe0\x41\x01\x12\x17\n\nrow_filter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12Y\n\x11post_scan_actions\x18\x06 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataQualitySpec.PostScanActionsB\x03\xe0\x41\x01\x1a\xda\x06\n\x0fPostScanActions\x12\x66\n\x0f\x62igquery_export\x18\x01 \x01(\x0b\x32H.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExportB\x03\xe0\x41\x01\x12n\n\x13notification_report\x18\x02 \x01(\x0b\x32L.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReportB\x03\xe0\x41\x01\x1a,\n\x0e\x42igQueryExport\x12\x1a\n\rresults_table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a!\n\nRecipients\x12\x13\n\x06\x65mails\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a\x35\n\x15ScoreThresholdTrigger\x12\x1c\n\x0fscore_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x1a\x13\n\x11JobFailureTrigger\x1a\x0f\n\rJobEndTrigger\x1a\xc0\x03\n\x12NotificationReport\x12]\n\nrecipients\x18\x01 \x01(\x0b\x32\x44.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.RecipientsB\x03\xe0\x41\x02\x12u\n\x17score_threshold_trigger\x18\x02 \x01(\x0b\x32O.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTriggerB\x03\xe0\x41\x01\x12m\n\x13job_failure_trigger\x18\x04 \x01(\x0b\x32K.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTriggerB\x03\xe0\x41\x01\x12\x65\n\x0fjob_end_trigger\x18\x05 \x01(\x0b\x32G.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTriggerB\x03\xe0\x41\x01\"\xd3\x06\n\x11\x44\x61taQualityResult\x12\x0e\n\x06passed\x18\x05 \x01(\x08\x12\x17\n\x05score\x18\t \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12H\n\ndimensions\x18\x02 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.DataQualityDimensionResult\x12G\n\x07\x63olumns\x18\n \x03(\x0b\x32\x31.google.cloud.dataplex.v1.DataQualityColumnResultB\x03\xe0\x41\x03\x12>\n\x05rules\x18\x03 \x03(\x0b\x32/.google.cloud.dataplex.v1.DataQualityRuleResult\x12\x11\n\trow_count\x18\x04 \x01(\x03\x12;\n\x0cscanned_data\x18\x07 \x01(\x0b\x32%.google.cloud.dataplex.v1.ScannedData\x12h\n\x18post_scan_actions_result\x18\x08 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultB\x03\xe0\x41\x03\x1a\xfd\x02\n\x15PostScanActionsResult\x12{\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32V.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResultB\x03\xe0\x41\x03\x1a\xe6\x01\n\x14\x42igQueryExportResult\x12p\n\x05state\x18\x01 \x01(\x0e\x32\\.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.StateB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\x42\x08\n\x06_score\"\xd3\x01\n\x15\x44\x61taQualityRuleResult\x12\x37\n\x04rule\x18\x01 \x01(\x0b\x32).google.cloud.dataplex.v1.DataQualityRule\x12\x0e\n\x06passed\x18\x07 \x01(\x08\x12\x17\n\x0f\x65valuated_count\x18\t \x01(\x03\x12\x14\n\x0cpassed_count\x18\x08 \x01(\x03\x12\x12\n\nnull_count\x18\x05 \x01(\x03\x12\x12\n\npass_ratio\x18\x06 \x01(\x01\x12\x1a\n\x12\x66\x61iling_rows_query\x18\n \x01(\t\"\x97\x01\n\x1a\x44\x61taQualityDimensionResult\x12\x46\n\tdimension\x18\x01 \x01(\x0b\x32..google.cloud.dataplex.v1.DataQualityDimensionB\x03\xe0\x41\x03\x12\x0e\n\x06passed\x18\x03 \x01(\x08\x12\x17\n\x05score\x18\x04 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x08\n\x06_score\"$\n\x14\x44\x61taQualityDimension\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xf6\x0c\n\x0f\x44\x61taQualityRule\x12W\n\x11range_expectation\x18\x01 \x01(\x0b\x32:.google.cloud.dataplex.v1.DataQualityRule.RangeExpectationH\x00\x12\\\n\x14non_null_expectation\x18\x02 \x01(\x0b\x32<.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectationH\x00\x12S\n\x0fset_expectation\x18\x03 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataQualityRule.SetExpectationH\x00\x12W\n\x11regex_expectation\x18\x04 \x01(\x0b\x32:.google.cloud.dataplex.v1.DataQualityRule.RegexExpectationH\x00\x12\x61\n\x16uniqueness_expectation\x18\x64 \x01(\x0b\x32?.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectationH\x00\x12j\n\x1bstatistic_range_expectation\x18\x65 \x01(\x0b\x32\x43.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectationH\x00\x12g\n\x19row_condition_expectation\x18\xc8\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectationH\x00\x12k\n\x1btable_condition_expectation\x18\xc9\x01 \x01(\x0b\x32\x43.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectationH\x00\x12\x14\n\x06\x63olumn\x18\xf4\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0bignore_null\x18\xf5\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x17\n\tdimension\x18\xf6\x03 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\tthreshold\x18\xf7\x03 \x01(\x01\x42\x03\xe0\x41\x01\x12\x12\n\x04name\x18\xf8\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0b\x64\x65scription\x18\xf9\x03 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x01\n\x10RangeExpectation\x12\x16\n\tmin_value\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tmax_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12strict_min_enabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12strict_max_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x14\n\x12NonNullExpectation\x1a%\n\x0eSetExpectation\x12\x13\n\x06values\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a&\n\x10RegexExpectation\x12\x12\n\x05regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x17\n\x15UniquenessExpectation\x1a\xc2\x02\n\x19StatisticRangeExpectation\x12k\n\tstatistic\x18\x01 \x01(\x0e\x32S.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatisticB\x03\xe0\x41\x01\x12\x16\n\tmin_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tmax_value\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12strict_min_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12strict_max_enabled\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"F\n\x0f\x43olumnStatistic\x12\x17\n\x13STATISTIC_UNDEFINED\x10\x00\x12\x08\n\x04MEAN\x10\x01\x12\x07\n\x03MIN\x10\x02\x12\x07\n\x03MAX\x10\x03\x1a\x36\n\x17RowConditionExpectation\x12\x1b\n\x0esql_expression\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x38\n\x19TableConditionExpectation\x12\x1b\n\x0esql_expression\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x0b\n\trule_type\"Q\n\x17\x44\x61taQualityColumnResult\x12\x13\n\x06\x63olumn\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\x05score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x08\n\x06_scoreB\xc4\x01\n\x1c\x63om.google.cloud.dataplex.v1B\x10\x44\x61taQualityProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" +descriptor_data = "\n+google/cloud/dataplex/v1/data_quality.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/dataplex/v1/processing.proto\"\xc0\x08\n\x0f\x44\x61taQualitySpec\x12=\n\x05rules\x18\x01 \x03(\x0b\x32).google.cloud.dataplex.v1.DataQualityRuleB\x03\xe0\x41\x02\x12\x1d\n\x10sampling_percent\x18\x04 \x01(\x02\x42\x03\xe0\x41\x01\x12\x17\n\nrow_filter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12Y\n\x11post_scan_actions\x18\x06 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataQualitySpec.PostScanActionsB\x03\xe0\x41\x01\x1a\xda\x06\n\x0fPostScanActions\x12\x66\n\x0f\x62igquery_export\x18\x01 \x01(\x0b\x32H.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExportB\x03\xe0\x41\x01\x12n\n\x13notification_report\x18\x02 \x01(\x0b\x32L.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReportB\x03\xe0\x41\x01\x1a,\n\x0e\x42igQueryExport\x12\x1a\n\rresults_table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a!\n\nRecipients\x12\x13\n\x06\x65mails\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a\x35\n\x15ScoreThresholdTrigger\x12\x1c\n\x0fscore_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x1a\x13\n\x11JobFailureTrigger\x1a\x0f\n\rJobEndTrigger\x1a\xc0\x03\n\x12NotificationReport\x12]\n\nrecipients\x18\x01 \x01(\x0b\x32\x44.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.RecipientsB\x03\xe0\x41\x02\x12u\n\x17score_threshold_trigger\x18\x02 \x01(\x0b\x32O.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTriggerB\x03\xe0\x41\x01\x12m\n\x13job_failure_trigger\x18\x04 \x01(\x0b\x32K.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTriggerB\x03\xe0\x41\x01\x12\x65\n\x0fjob_end_trigger\x18\x05 \x01(\x0b\x32G.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTriggerB\x03\xe0\x41\x01\"\xd3\x06\n\x11\x44\x61taQualityResult\x12\x0e\n\x06passed\x18\x05 \x01(\x08\x12\x17\n\x05score\x18\t \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12H\n\ndimensions\x18\x02 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.DataQualityDimensionResult\x12G\n\x07\x63olumns\x18\n \x03(\x0b\x32\x31.google.cloud.dataplex.v1.DataQualityColumnResultB\x03\xe0\x41\x03\x12>\n\x05rules\x18\x03 \x03(\x0b\x32/.google.cloud.dataplex.v1.DataQualityRuleResult\x12\x11\n\trow_count\x18\x04 \x01(\x03\x12;\n\x0cscanned_data\x18\x07 \x01(\x0b\x32%.google.cloud.dataplex.v1.ScannedData\x12h\n\x18post_scan_actions_result\x18\x08 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultB\x03\xe0\x41\x03\x1a\xfd\x02\n\x15PostScanActionsResult\x12{\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32V.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResultB\x03\xe0\x41\x03\x1a\xe6\x01\n\x14\x42igQueryExportResult\x12p\n\x05state\x18\x01 \x01(\x0e\x32\\.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.StateB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\x42\x08\n\x06_score\"\xf5\x01\n\x15\x44\x61taQualityRuleResult\x12\x37\n\x04rule\x18\x01 \x01(\x0b\x32).google.cloud.dataplex.v1.DataQualityRule\x12\x0e\n\x06passed\x18\x07 \x01(\x08\x12\x17\n\x0f\x65valuated_count\x18\t \x01(\x03\x12\x14\n\x0cpassed_count\x18\x08 \x01(\x03\x12\x12\n\nnull_count\x18\x05 \x01(\x03\x12\x12\n\npass_ratio\x18\x06 \x01(\x01\x12\x1a\n\x12\x66\x61iling_rows_query\x18\n \x01(\t\x12 \n\x13\x61ssertion_row_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\"\x97\x01\n\x1a\x44\x61taQualityDimensionResult\x12\x46\n\tdimension\x18\x01 \x01(\x0b\x32..google.cloud.dataplex.v1.DataQualityDimensionB\x03\xe0\x41\x03\x12\x0e\n\x06passed\x18\x03 \x01(\x08\x12\x17\n\x05score\x18\x04 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x08\n\x06_score\"$\n\x14\x44\x61taQualityDimension\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xf4\r\n\x0f\x44\x61taQualityRule\x12W\n\x11range_expectation\x18\x01 \x01(\x0b\x32:.google.cloud.dataplex.v1.DataQualityRule.RangeExpectationH\x00\x12\\\n\x14non_null_expectation\x18\x02 \x01(\x0b\x32<.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectationH\x00\x12S\n\x0fset_expectation\x18\x03 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataQualityRule.SetExpectationH\x00\x12W\n\x11regex_expectation\x18\x04 \x01(\x0b\x32:.google.cloud.dataplex.v1.DataQualityRule.RegexExpectationH\x00\x12\x61\n\x16uniqueness_expectation\x18\x64 \x01(\x0b\x32?.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectationH\x00\x12j\n\x1bstatistic_range_expectation\x18\x65 \x01(\x0b\x32\x43.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectationH\x00\x12g\n\x19row_condition_expectation\x18\xc8\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectationH\x00\x12k\n\x1btable_condition_expectation\x18\xc9\x01 \x01(\x0b\x32\x43.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectationH\x00\x12P\n\rsql_assertion\x18\xca\x01 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DataQualityRule.SqlAssertionH\x00\x12\x14\n\x06\x63olumn\x18\xf4\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0bignore_null\x18\xf5\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x17\n\tdimension\x18\xf6\x03 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\tthreshold\x18\xf7\x03 \x01(\x01\x42\x03\xe0\x41\x01\x12\x12\n\x04name\x18\xf8\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0b\x64\x65scription\x18\xf9\x03 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x01\n\x10RangeExpectation\x12\x16\n\tmin_value\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tmax_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12strict_min_enabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12strict_max_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x14\n\x12NonNullExpectation\x1a%\n\x0eSetExpectation\x12\x13\n\x06values\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a&\n\x10RegexExpectation\x12\x12\n\x05regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x17\n\x15UniquenessExpectation\x1a\xc2\x02\n\x19StatisticRangeExpectation\x12k\n\tstatistic\x18\x01 \x01(\x0e\x32S.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatisticB\x03\xe0\x41\x01\x12\x16\n\tmin_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tmax_value\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12strict_min_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12strict_max_enabled\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"F\n\x0f\x43olumnStatistic\x12\x17\n\x13STATISTIC_UNDEFINED\x10\x00\x12\x08\n\x04MEAN\x10\x01\x12\x07\n\x03MIN\x10\x02\x12\x07\n\x03MAX\x10\x03\x1a\x36\n\x17RowConditionExpectation\x12\x1b\n\x0esql_expression\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x38\n\x19TableConditionExpectation\x12\x1b\n\x0esql_expression\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a*\n\x0cSqlAssertion\x12\x1a\n\rsql_statement\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x0b\n\trule_type\"Q\n\x17\x44\x61taQualityColumnResult\x12\x13\n\x06\x63olumn\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\x05score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x08\n\x06_scoreB\xc4\x01\n\x1c\x63om.google.cloud.dataplex.v1B\x10\x44\x61taQualityProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -65,6 +65,7 @@ module V1 DataQualityRule::StatisticRangeExpectation::ColumnStatistic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic").enummodule DataQualityRule::RowConditionExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation").msgclass DataQualityRule::TableConditionExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation").msgclass + DataQualityRule::SqlAssertion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.SqlAssertion").msgclass DataQualityColumnResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityColumnResult").msgclass end end diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb index f8c35d9673ab..358f748a0eaa 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb @@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n#google/cloud/dataplex/v1/logs.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\t\n\x0e\x44iscoveryEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07lake_id\x18\x02 \x01(\t\x12\x0f\n\x07zone_id\x18\x03 \x01(\t\x12\x10\n\x08\x61sset_id\x18\x04 \x01(\t\x12\x15\n\rdata_location\x18\x05 \x01(\t\x12@\n\x04type\x18\n \x01(\x0e\x32\x32.google.cloud.dataplex.v1.DiscoveryEvent.EventType\x12H\n\x06\x63onfig\x18\x14 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetailsH\x00\x12H\n\x06\x65ntity\x18\x15 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetailsH\x00\x12N\n\tpartition\x18\x16 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetailsH\x00\x12H\n\x06\x61\x63tion\x18\x17 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetailsH\x00\x1a\x9e\x01\n\rConfigDetails\x12Z\n\nparameters\x18\x01 \x03(\x0b\x32\x46.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.ParametersEntry\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x62\n\rEntityDetails\x12\x0e\n\x06\x65ntity\x18\x01 \x01(\t\x12\x41\n\x04type\x18\x02 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.DiscoveryEvent.EntityType\x1a\x98\x01\n\x10PartitionDetails\x12\x11\n\tpartition\x18\x01 \x01(\t\x12\x0e\n\x06\x65ntity\x18\x02 \x01(\t\x12\x41\n\x04type\x18\x03 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.DiscoveryEvent.EntityType\x12\x1e\n\x16sampled_data_locations\x18\x04 \x03(\t\x1a\x1d\n\rActionDetails\x12\x0c\n\x04type\x18\x01 \x01(\t\"\xb4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43ONFIG\x10\x01\x12\x12\n\x0e\x45NTITY_CREATED\x10\x02\x12\x12\n\x0e\x45NTITY_UPDATED\x10\x03\x12\x12\n\x0e\x45NTITY_DELETED\x10\x04\x12\x15\n\x11PARTITION_CREATED\x10\x05\x12\x15\n\x11PARTITION_UPDATED\x10\x06\x12\x15\n\x11PARTITION_DELETED\x10\x07\"A\n\nEntityType\x12\x1b\n\x17\x45NTITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02\x42\t\n\x07\x64\x65tails\"\xc5\x05\n\x08JobEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x05state\x18\x05 \x01(\x0e\x32(.google.cloud.dataplex.v1.JobEvent.State\x12\x0f\n\x07retries\x18\x06 \x01(\x05\x12\x35\n\x04type\x18\x07 \x01(\x0e\x32\'.google.cloud.dataplex.v1.JobEvent.Type\x12;\n\x07service\x18\x08 \x01(\x0e\x32*.google.cloud.dataplex.v1.JobEvent.Service\x12\x13\n\x0bservice_job\x18\t \x01(\t\x12N\n\x11\x65xecution_trigger\x18\x0b \x01(\x0e\x32\x33.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SPARK\x10\x01\x12\x0c\n\x08NOTEBOOK\x10\x02\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\x0b\n\x07\x41\x42ORTED\x10\x04\"0\n\x07Service\x12\x17\n\x13SERVICE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TAPROC\x10\x01\"W\n\x10\x45xecutionTrigger\x12!\n\x1d\x45XECUTION_TRIGGER_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTASK_CONFIG\x10\x01\x12\x0f\n\x0bRUN_REQUEST\x10\x02\"\xbd\x05\n\x0cSessionEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07user_id\x18\x02 \x01(\t\x12\x12\n\nsession_id\x18\x03 \x01(\t\x12>\n\x04type\x18\x04 \x01(\x0e\x32\x30.google.cloud.dataplex.v1.SessionEvent.EventType\x12\x43\n\x05query\x18\x05 \x01(\x0b\x32\x32.google.cloud.dataplex.v1.SessionEvent.QueryDetailH\x00\x12\x17\n\x0f\x65vent_succeeded\x18\x06 \x01(\x08\x12\x1c\n\x14\x66\x61st_startup_enabled\x18\x07 \x01(\x08\x12\x36\n\x13unassigned_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\xa3\x02\n\x0bQueryDetail\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12\x12\n\nquery_text\x18\x02 \x01(\t\x12I\n\x06\x65ngine\x18\x03 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine\x12+\n\x08\x64uration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x19\n\x11result_size_bytes\x18\x05 \x01(\x03\x12\x1c\n\x14\x64\x61ta_processed_bytes\x18\x06 \x01(\x03\"=\n\x06\x45ngine\x12\x16\n\x12\x45NGINE_UNSPECIFIED\x10\x00\x12\r\n\tSPARK_SQL\x10\x01\x12\x0c\n\x08\x42IGQUERY\x10\x02\"S\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05START\x10\x01\x12\x08\n\x04STOP\x10\x02\x12\t\n\x05QUERY\x10\x03\x12\n\n\x06\x43REATE\x10\x04\x42\x08\n\x06\x64\x65tail\"\xba\x07\n\x0fGovernanceEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12G\n\nevent_type\x18\x02 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.GovernanceEvent.EventType\x12\x45\n\x06\x65ntity\x18\x03 \x01(\x0b\x32\x30.google.cloud.dataplex.v1.GovernanceEvent.EntityH\x00\x88\x01\x01\x1a\xd2\x01\n\x06\x45ntity\x12\x33\n\x06\x65ntity\x18\x01 \x01(\tB#\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12P\n\x0b\x65ntity_type\x18\x02 \x01(\x0e\x32;.google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType\"A\n\nEntityType\x12\x1b\n\x17\x45NTITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02\"\xa5\x04\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aRESOURCE_IAM_POLICY_UPDATE\x10\x01\x12\x19\n\x15\x42IGQUERY_TABLE_CREATE\x10\x02\x12\x19\n\x15\x42IGQUERY_TABLE_UPDATE\x10\x03\x12\x19\n\x15\x42IGQUERY_TABLE_DELETE\x10\x04\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_CREATE\x10\x05\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_UPDATE\x10\x06\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_DELETE\x10\x07\x12\x1c\n\x18\x42IGQUERY_TAXONOMY_CREATE\x10\n\x12\x1e\n\x1a\x42IGQUERY_POLICY_TAG_CREATE\x10\x0b\x12\x1e\n\x1a\x42IGQUERY_POLICY_TAG_DELETE\x10\x0c\x12&\n\"BIGQUERY_POLICY_TAG_SET_IAM_POLICY\x10\r\x12\x18\n\x14\x41\x43\x43\x45SS_POLICY_UPDATE\x10\x0e\x12%\n!GOVERNANCE_RULE_MATCHED_RESOURCES\x10\x0f\x12(\n$GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS\x10\x10\x12\x1a\n\x16GOVERNANCE_RULE_ERRORS\x10\x11\x12\x1e\n\x1aGOVERNANCE_RULE_PROCESSING\x10\x12\x42\t\n\x07_entity\"\xf3\x12\n\rDataScanEvent\x12\x13\n\x0b\x64\x61ta_source\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x04type\x18\x05 \x01(\x0e\x32\x30.google.cloud.dataplex.v1.DataScanEvent.ScanType\x12<\n\x05state\x18\x06 \x01(\x0e\x32-.google.cloud.dataplex.v1.DataScanEvent.State\x12\x0f\n\x07message\x18\x07 \x01(\t\x12\x14\n\x0cspec_version\x18\x08 \x01(\t\x12@\n\x07trigger\x18\t \x01(\x0e\x32/.google.cloud.dataplex.v1.DataScanEvent.Trigger\x12<\n\x05scope\x18\n \x01(\x0e\x32-.google.cloud.dataplex.v1.DataScanEvent.Scope\x12Q\n\x0c\x64\x61ta_profile\x18\x65 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultH\x00\x12Q\n\x0c\x64\x61ta_quality\x18\x66 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultH\x00\x12\x62\n\x14\x64\x61ta_profile_configs\x18\xc9\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigsH\x01\x12\x62\n\x14\x64\x61ta_quality_configs\x18\xca\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigsH\x01\x12_\n\x18post_scan_actions_result\x18\x0b \x01(\x0b\x32=.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult\x1a&\n\x11\x44\x61taProfileResult\x12\x11\n\trow_count\x18\x01 \x01(\x03\x1a\x9c\x04\n\x11\x44\x61taQualityResult\x12\x11\n\trow_count\x18\x01 \x01(\x03\x12\x0e\n\x06passed\x18\x02 \x01(\x08\x12h\n\x10\x64imension_passed\x18\x03 \x03(\x0b\x32N.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.DimensionPassedEntry\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x66\n\x0f\x64imension_score\x18\x05 \x03(\x0b\x32M.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.DimensionScoreEntry\x12`\n\x0c\x63olumn_score\x18\x06 \x03(\x0b\x32J.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.ColumnScoreEntry\x1a\x36\n\x14\x44imensionPassedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\x35\n\x13\x44imensionScoreEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1a\x32\n\x10\x43olumnScoreEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1ap\n\x19\x44\x61taProfileAppliedConfigs\x12\x18\n\x10sampling_percent\x18\x01 \x01(\x02\x12\x1a\n\x12row_filter_applied\x18\x02 \x01(\x08\x12\x1d\n\x15\x63olumn_filter_applied\x18\x03 \x01(\x08\x1aQ\n\x19\x44\x61taQualityAppliedConfigs\x12\x18\n\x10sampling_percent\x18\x01 \x01(\x02\x12\x1a\n\x12row_filter_applied\x18\x02 \x01(\x08\x1a\xe6\x02\n\x15PostScanActionsResult\x12r\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32R.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult\x1a\xd8\x01\n\x14\x42igQueryExportResult\x12g\n\x05state\x18\x01 \x01(\x0e\x32X.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State\x12\x0f\n\x07message\x18\x02 \x01(\t\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\"I\n\x08ScanType\x12\x19\n\x15SCAN_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_PROFILE\x10\x01\x12\x10\n\x0c\x44\x41TA_QUALITY\x10\x02\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x12\x0b\n\x07\x43REATED\x10\x05\"?\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\x0c\n\x08SCHEDULE\x10\x02\"9\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\x0f\n\x0bINCREMENTAL\x10\x02\x42\x08\n\x06resultB\x10\n\x0e\x61ppliedConfigs\"\xe9\x06\n\x19\x44\x61taQualityScanRuleResult\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x61ta_source\x18\x02 \x01(\t\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\t\x12\x11\n\trule_name\x18\x04 \x01(\t\x12O\n\trule_type\x18\x05 \x01(\x0e\x32<.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType\x12Z\n\x0e\x65valution_type\x18\x06 \x01(\x0e\x32\x42.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType\x12\x16\n\x0erule_dimension\x18\x07 \x01(\t\x12\x19\n\x11threshold_percent\x18\x08 \x01(\x01\x12J\n\x06result\x18\t \x01(\x0e\x32:.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result\x12\x1b\n\x13\x65valuated_row_count\x18\n \x01(\x03\x12\x18\n\x10passed_row_count\x18\x0b \x01(\x03\x12\x16\n\x0enull_row_count\x18\x0c \x01(\x03\"\xff\x01\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14NON_NULL_EXPECTATION\x10\x01\x12\x15\n\x11RANGE_EXPECTATION\x10\x02\x12\x15\n\x11REGEX_EXPECTATION\x10\x03\x12\x1d\n\x19ROW_CONDITION_EXPECTATION\x10\x04\x12\x13\n\x0fSET_EXPECTATION\x10\x05\x12\x1f\n\x1bSTATISTIC_RANGE_EXPECTATION\x10\x06\x12\x1f\n\x1bTABLE_CONDITION_EXPECTATION\x10\x07\x12\x1a\n\x16UNIQUENESS_EXPECTATION\x10\x08\"M\n\x0e\x45valuationType\x12\x1f\n\x1b\x45VALUATION_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PER_ROW\x10\x01\x12\r\n\tAGGREGATE\x10\x02\"8\n\x06Result\x12\x16\n\x12RESULT_UNSPECIFIED\x10\x00\x12\n\n\x06PASSED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x42\x65\n\x1c\x63om.google.cloud.dataplex.v1B\tLogsProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" +descriptor_data = "\n#google/cloud/dataplex/v1/logs.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\t\n\x0e\x44iscoveryEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07lake_id\x18\x02 \x01(\t\x12\x0f\n\x07zone_id\x18\x03 \x01(\t\x12\x10\n\x08\x61sset_id\x18\x04 \x01(\t\x12\x15\n\rdata_location\x18\x05 \x01(\t\x12@\n\x04type\x18\n \x01(\x0e\x32\x32.google.cloud.dataplex.v1.DiscoveryEvent.EventType\x12H\n\x06\x63onfig\x18\x14 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetailsH\x00\x12H\n\x06\x65ntity\x18\x15 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetailsH\x00\x12N\n\tpartition\x18\x16 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetailsH\x00\x12H\n\x06\x61\x63tion\x18\x17 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetailsH\x00\x1a\x9e\x01\n\rConfigDetails\x12Z\n\nparameters\x18\x01 \x03(\x0b\x32\x46.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.ParametersEntry\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x62\n\rEntityDetails\x12\x0e\n\x06\x65ntity\x18\x01 \x01(\t\x12\x41\n\x04type\x18\x02 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.DiscoveryEvent.EntityType\x1a\x98\x01\n\x10PartitionDetails\x12\x11\n\tpartition\x18\x01 \x01(\t\x12\x0e\n\x06\x65ntity\x18\x02 \x01(\t\x12\x41\n\x04type\x18\x03 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.DiscoveryEvent.EntityType\x12\x1e\n\x16sampled_data_locations\x18\x04 \x03(\t\x1a\x1d\n\rActionDetails\x12\x0c\n\x04type\x18\x01 \x01(\t\"\xb4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43ONFIG\x10\x01\x12\x12\n\x0e\x45NTITY_CREATED\x10\x02\x12\x12\n\x0e\x45NTITY_UPDATED\x10\x03\x12\x12\n\x0e\x45NTITY_DELETED\x10\x04\x12\x15\n\x11PARTITION_CREATED\x10\x05\x12\x15\n\x11PARTITION_UPDATED\x10\x06\x12\x15\n\x11PARTITION_DELETED\x10\x07\"A\n\nEntityType\x12\x1b\n\x17\x45NTITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02\x42\t\n\x07\x64\x65tails\"\xc5\x05\n\x08JobEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x05state\x18\x05 \x01(\x0e\x32(.google.cloud.dataplex.v1.JobEvent.State\x12\x0f\n\x07retries\x18\x06 \x01(\x05\x12\x35\n\x04type\x18\x07 \x01(\x0e\x32\'.google.cloud.dataplex.v1.JobEvent.Type\x12;\n\x07service\x18\x08 \x01(\x0e\x32*.google.cloud.dataplex.v1.JobEvent.Service\x12\x13\n\x0bservice_job\x18\t \x01(\t\x12N\n\x11\x65xecution_trigger\x18\x0b \x01(\x0e\x32\x33.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SPARK\x10\x01\x12\x0c\n\x08NOTEBOOK\x10\x02\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\x0b\n\x07\x41\x42ORTED\x10\x04\"0\n\x07Service\x12\x17\n\x13SERVICE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TAPROC\x10\x01\"W\n\x10\x45xecutionTrigger\x12!\n\x1d\x45XECUTION_TRIGGER_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTASK_CONFIG\x10\x01\x12\x0f\n\x0bRUN_REQUEST\x10\x02\"\xbd\x05\n\x0cSessionEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07user_id\x18\x02 \x01(\t\x12\x12\n\nsession_id\x18\x03 \x01(\t\x12>\n\x04type\x18\x04 \x01(\x0e\x32\x30.google.cloud.dataplex.v1.SessionEvent.EventType\x12\x43\n\x05query\x18\x05 \x01(\x0b\x32\x32.google.cloud.dataplex.v1.SessionEvent.QueryDetailH\x00\x12\x17\n\x0f\x65vent_succeeded\x18\x06 \x01(\x08\x12\x1c\n\x14\x66\x61st_startup_enabled\x18\x07 \x01(\x08\x12\x36\n\x13unassigned_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\xa3\x02\n\x0bQueryDetail\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12\x12\n\nquery_text\x18\x02 \x01(\t\x12I\n\x06\x65ngine\x18\x03 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine\x12+\n\x08\x64uration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x19\n\x11result_size_bytes\x18\x05 \x01(\x03\x12\x1c\n\x14\x64\x61ta_processed_bytes\x18\x06 \x01(\x03\"=\n\x06\x45ngine\x12\x16\n\x12\x45NGINE_UNSPECIFIED\x10\x00\x12\r\n\tSPARK_SQL\x10\x01\x12\x0c\n\x08\x42IGQUERY\x10\x02\"S\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05START\x10\x01\x12\x08\n\x04STOP\x10\x02\x12\t\n\x05QUERY\x10\x03\x12\n\n\x06\x43REATE\x10\x04\x42\x08\n\x06\x64\x65tail\"\xba\x07\n\x0fGovernanceEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12G\n\nevent_type\x18\x02 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.GovernanceEvent.EventType\x12\x45\n\x06\x65ntity\x18\x03 \x01(\x0b\x32\x30.google.cloud.dataplex.v1.GovernanceEvent.EntityH\x00\x88\x01\x01\x1a\xd2\x01\n\x06\x45ntity\x12\x33\n\x06\x65ntity\x18\x01 \x01(\tB#\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12P\n\x0b\x65ntity_type\x18\x02 \x01(\x0e\x32;.google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType\"A\n\nEntityType\x12\x1b\n\x17\x45NTITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02\"\xa5\x04\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aRESOURCE_IAM_POLICY_UPDATE\x10\x01\x12\x19\n\x15\x42IGQUERY_TABLE_CREATE\x10\x02\x12\x19\n\x15\x42IGQUERY_TABLE_UPDATE\x10\x03\x12\x19\n\x15\x42IGQUERY_TABLE_DELETE\x10\x04\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_CREATE\x10\x05\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_UPDATE\x10\x06\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_DELETE\x10\x07\x12\x1c\n\x18\x42IGQUERY_TAXONOMY_CREATE\x10\n\x12\x1e\n\x1a\x42IGQUERY_POLICY_TAG_CREATE\x10\x0b\x12\x1e\n\x1a\x42IGQUERY_POLICY_TAG_DELETE\x10\x0c\x12&\n\"BIGQUERY_POLICY_TAG_SET_IAM_POLICY\x10\r\x12\x18\n\x14\x41\x43\x43\x45SS_POLICY_UPDATE\x10\x0e\x12%\n!GOVERNANCE_RULE_MATCHED_RESOURCES\x10\x0f\x12(\n$GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS\x10\x10\x12\x1a\n\x16GOVERNANCE_RULE_ERRORS\x10\x11\x12\x1e\n\x1aGOVERNANCE_RULE_PROCESSING\x10\x12\x42\t\n\x07_entity\"\xf3\x12\n\rDataScanEvent\x12\x13\n\x0b\x64\x61ta_source\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x04type\x18\x05 \x01(\x0e\x32\x30.google.cloud.dataplex.v1.DataScanEvent.ScanType\x12<\n\x05state\x18\x06 \x01(\x0e\x32-.google.cloud.dataplex.v1.DataScanEvent.State\x12\x0f\n\x07message\x18\x07 \x01(\t\x12\x14\n\x0cspec_version\x18\x08 \x01(\t\x12@\n\x07trigger\x18\t \x01(\x0e\x32/.google.cloud.dataplex.v1.DataScanEvent.Trigger\x12<\n\x05scope\x18\n \x01(\x0e\x32-.google.cloud.dataplex.v1.DataScanEvent.Scope\x12Q\n\x0c\x64\x61ta_profile\x18\x65 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultH\x00\x12Q\n\x0c\x64\x61ta_quality\x18\x66 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultH\x00\x12\x62\n\x14\x64\x61ta_profile_configs\x18\xc9\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigsH\x01\x12\x62\n\x14\x64\x61ta_quality_configs\x18\xca\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigsH\x01\x12_\n\x18post_scan_actions_result\x18\x0b \x01(\x0b\x32=.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult\x1a&\n\x11\x44\x61taProfileResult\x12\x11\n\trow_count\x18\x01 \x01(\x03\x1a\x9c\x04\n\x11\x44\x61taQualityResult\x12\x11\n\trow_count\x18\x01 \x01(\x03\x12\x0e\n\x06passed\x18\x02 \x01(\x08\x12h\n\x10\x64imension_passed\x18\x03 \x03(\x0b\x32N.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.DimensionPassedEntry\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x66\n\x0f\x64imension_score\x18\x05 \x03(\x0b\x32M.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.DimensionScoreEntry\x12`\n\x0c\x63olumn_score\x18\x06 \x03(\x0b\x32J.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.ColumnScoreEntry\x1a\x36\n\x14\x44imensionPassedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\x35\n\x13\x44imensionScoreEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1a\x32\n\x10\x43olumnScoreEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1ap\n\x19\x44\x61taProfileAppliedConfigs\x12\x18\n\x10sampling_percent\x18\x01 \x01(\x02\x12\x1a\n\x12row_filter_applied\x18\x02 \x01(\x08\x12\x1d\n\x15\x63olumn_filter_applied\x18\x03 \x01(\x08\x1aQ\n\x19\x44\x61taQualityAppliedConfigs\x12\x18\n\x10sampling_percent\x18\x01 \x01(\x02\x12\x1a\n\x12row_filter_applied\x18\x02 \x01(\x08\x1a\xe6\x02\n\x15PostScanActionsResult\x12r\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32R.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult\x1a\xd8\x01\n\x14\x42igQueryExportResult\x12g\n\x05state\x18\x01 \x01(\x0e\x32X.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State\x12\x0f\n\x07message\x18\x02 \x01(\t\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\"I\n\x08ScanType\x12\x19\n\x15SCAN_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_PROFILE\x10\x01\x12\x10\n\x0c\x44\x41TA_QUALITY\x10\x02\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x12\x0b\n\x07\x43REATED\x10\x05\"?\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\x0c\n\x08SCHEDULE\x10\x02\"9\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\x0f\n\x0bINCREMENTAL\x10\x02\x42\x08\n\x06resultB\x10\n\x0e\x61ppliedConfigs\"\x99\x07\n\x19\x44\x61taQualityScanRuleResult\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x61ta_source\x18\x02 \x01(\t\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\t\x12\x11\n\trule_name\x18\x04 \x01(\t\x12O\n\trule_type\x18\x05 \x01(\x0e\x32<.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType\x12Z\n\x0e\x65valution_type\x18\x06 \x01(\x0e\x32\x42.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType\x12\x16\n\x0erule_dimension\x18\x07 \x01(\t\x12\x19\n\x11threshold_percent\x18\x08 \x01(\x01\x12J\n\x06result\x18\t \x01(\x0e\x32:.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result\x12\x1b\n\x13\x65valuated_row_count\x18\n \x01(\x03\x12\x18\n\x10passed_row_count\x18\x0b \x01(\x03\x12\x16\n\x0enull_row_count\x18\x0c \x01(\x03\x12\x1b\n\x13\x61ssertion_row_count\x18\r \x01(\x03\"\x92\x02\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14NON_NULL_EXPECTATION\x10\x01\x12\x15\n\x11RANGE_EXPECTATION\x10\x02\x12\x15\n\x11REGEX_EXPECTATION\x10\x03\x12\x1d\n\x19ROW_CONDITION_EXPECTATION\x10\x04\x12\x13\n\x0fSET_EXPECTATION\x10\x05\x12\x1f\n\x1bSTATISTIC_RANGE_EXPECTATION\x10\x06\x12\x1f\n\x1bTABLE_CONDITION_EXPECTATION\x10\x07\x12\x1a\n\x16UNIQUENESS_EXPECTATION\x10\x08\x12\x11\n\rSQL_ASSERTION\x10\t\"M\n\x0e\x45valuationType\x12\x1f\n\x1b\x45VALUATION_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PER_ROW\x10\x01\x12\r\n\tAGGREGATE\x10\x02\"8\n\x06Result\x12\x16\n\x12RESULT_UNSPECIFIED\x10\x00\x12\n\n\x06PASSED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x42\x65\n\x1c\x63om.google.cloud.dataplex.v1B\tLogsProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb index b46556cb694c..aca578b5e853 100644 --- a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb +++ b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb @@ -390,9 +390,12 @@ class AspectSource # Output only. The time when the Entry was last updated. # @!attribute [rw] aspects # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Dataplex::V1::Aspect}] - # Optional. The Aspects attached to the Entry. The key is either the resource - # name of the aspect type (if the aspect is attached directly to the entry) - # or "aspectType@path" if the aspect is attached to an entry's path. + # 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) # @!attribute [rw] parent_entry # @return [::String] # Optional. Immutable. The resource name of the parent entry. @@ -905,15 +908,17 @@ class DeleteEntryRequest # Optional. A filter on the entries to return. # Filters are case-sensitive. # The request can be filtered by the following fields: - # entry_type, display_name. + # 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. Example filter expressions: - # "display_name=AnExampleDisplayName" + # 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/a* OR "entry_type=projects/k*" - # "NOT display_name=AnotherExampleDisplayName" + # "entry_type=projects/example-project/locations/us/entryTypes/a* OR + # entry_type=projects/another-project/locations/*" + # "NOT entry_source.display_name=AnotherExampleDisplayName" class ListEntriesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1001,34 +1006,6 @@ class SearchEntriesRequest end # A single result of a SearchEntries request. - # @!attribute [rw] entry - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Resource name of the entry. - # @!attribute [rw] display_name - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Display name. - # @!attribute [rw] entry_type - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # The entry type. - # @!attribute [rw] modify_time - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # The last modification timestamp. - # @!attribute [rw] fully_qualified_name - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Fully qualified name. - # @!attribute [rw] description - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Entry description. - # @!attribute [rw] relative_resource - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Relative resource name. # @!attribute [rw] linked_resource # @return [::String] # Linked resource name. diff --git a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb index d09039224d12..d4a8449d98eb 100644 --- a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb +++ b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb @@ -239,6 +239,12 @@ module State # The query to find rows that did not pass this rule. # # This field is only valid for row-level type rules. + # @!attribute [r] assertion_row_count + # @return [::Integer] + # Output only. The number of rows returned by the sql statement in the + # SqlAssertion rule. + # + # This field is only valid for SqlAssertion rules. class DataQualityRuleResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -307,6 +313,10 @@ class DataQualityDimension # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation] # Aggregate rule which evaluates whether the provided expression is true # for a table. + # @!attribute [rw] sql_assertion + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion] + # Aggregate rule which evaluates the number of rows returned for the + # provided statement. # @!attribute [rw] column # @return [::String] # Optional. The unnested column which this rule is evaluated against. @@ -487,6 +497,25 @@ class TableConditionExpectation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Queries for rows returned by the provided SQL statement. If any rows are + # are returned, this rule fails. + # + # The SQL statement needs to use BigQuery standard SQL syntax, and must not + # contain any semicolons. + # + # $\\{data()} can be used to reference the rows being evaluated, i.e. the table + # after all additional filters (row filters, incremental data filters, + # sampling) are applied. + # + # Example: SELECT * FROM $\\{data()} WHERE price < 0 + # @!attribute [rw] sql_statement + # @return [::String] + # Optional. The SQL statement. + class SqlAssertion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # DataQualityColumnResult provides a more detailed, per-column view of diff --git a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb index 6a77ab2a695b..fa64ef0cad54 100644 --- a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb +++ b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb @@ -734,6 +734,10 @@ module Scope # @!attribute [rw] null_row_count # @return [::Integer] # The number of rows with null values in the specified column. + # @!attribute [rw] assertion_row_count + # @return [::Integer] + # The number of rows returned by the sql statement in the SqlAssertion rule. + # This field is only valid for SqlAssertion rules. class DataQualityScanRuleResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -774,6 +778,10 @@ module RuleType # Please see # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#uniquenessexpectation. UNIQUENESS_EXPECTATION = 8 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#sqlAssertion. + SQL_ASSERTION = 9 end # The evaluation type of the data quality rule. 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 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json deleted file mode 100644 index 70ddbcadde04..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "dataplex.googleapis.com", - "api_shortname": "dataplex", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-dataplex-v1/latest", - "distribution_name": "google-cloud-dataplex-v1", - "is_cloud": true, - "language": "ruby", - "name": "dataplex", - "name_pretty": "Dataplex V1 API", - "product_documentation": "https://cloud.google.com/dataplex/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. Note that google-cloud-dataplex-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dataplex instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/dataplex/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml b/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml deleted file mode 100644 index 029e6a990334..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-dataplex-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-dataplex-v1.rb" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb b/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.yardopts b/owl-bot-staging/google-cloud-dataplex-v1/.yardopts deleted file mode 100644 index 610ce5201635..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Dataplex V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md deleted file mode 100644 index 1c60fe75f8a9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-dataplex-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-dataplex-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/dataplex/v1" - -client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/dataplex/v1" - -::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-dataplex-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/dataplex/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-dataplex-v1/Gemfile b/owl-bot-staging/google-cloud-dataplex-v1/Gemfile deleted file mode 100644 index 95163a6d11f8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md b/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/README.md b/owl-bot-staging/google-cloud-dataplex-v1/README.md deleted file mode 100644 index 9ad26827a2d7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/README.md +++ /dev/null @@ -1,144 +0,0 @@ -# Ruby Client for the Dataplex V1 API - -Dataplex API is used to manage the lifecycle of data lakes. - -Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Dataplex V1 API. Most users should consider using -the main client gem, -[google-cloud-dataplex](https://rubygems.org/gems/google-cloud-dataplex). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-dataplex-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/dataplex.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/dataplex/v1" - -client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new -request = ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new # (request fields as keyword arguments...) -response = client.create_lake request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-dataplex-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/dataplex/) -for general usage information. - -## Enabling Logging - -To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. -The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, -or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) -that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) -and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. - -Configuring a Ruby stdlib logger: - -```ruby -require "logger" - -module MyLogger - LOGGER = Logger.new $stderr, level: Logger::WARN - def logger - LOGGER - end -end - -# Define a gRPC module-level logger method before grpc/logconfig.rb loads. -module GRPC - extend MyLogger -end -``` - - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 2.7+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-dataplex`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-dataplex-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-dataplex`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-dataplex-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/Rakefile b/owl-bot-staging/google-cloud-dataplex-v1/Rakefile deleted file mode 100644 index 7de3c4e2f174..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-dataplex-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/dataplex/v1/dataplex_service/credentials" - ::Google::Cloud::Dataplex::V1::DataplexService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-dataplex-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-dataplex-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-dataplex-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-dataplex-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-dataplex-v1" - header "google-cloud-dataplex-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-dataplex-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-dataplex-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-dataplex-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-dataplex-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json deleted file mode 100644 index 99bf76d4e7ae..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json +++ /dev/null @@ -1,543 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.dataplex.v1", - "libraryPackage": "::Google::Cloud::Dataplex::V1", - "services": { - "DataplexService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::DataplexService::Client", - "rpcs": { - "CreateLake": { - "methods": [ - "create_lake" - ] - }, - "UpdateLake": { - "methods": [ - "update_lake" - ] - }, - "DeleteLake": { - "methods": [ - "delete_lake" - ] - }, - "ListLakes": { - "methods": [ - "list_lakes" - ] - }, - "GetLake": { - "methods": [ - "get_lake" - ] - }, - "ListLakeActions": { - "methods": [ - "list_lake_actions" - ] - }, - "CreateZone": { - "methods": [ - "create_zone" - ] - }, - "UpdateZone": { - "methods": [ - "update_zone" - ] - }, - "DeleteZone": { - "methods": [ - "delete_zone" - ] - }, - "ListZones": { - "methods": [ - "list_zones" - ] - }, - "GetZone": { - "methods": [ - "get_zone" - ] - }, - "ListZoneActions": { - "methods": [ - "list_zone_actions" - ] - }, - "CreateAsset": { - "methods": [ - "create_asset" - ] - }, - "UpdateAsset": { - "methods": [ - "update_asset" - ] - }, - "DeleteAsset": { - "methods": [ - "delete_asset" - ] - }, - "ListAssets": { - "methods": [ - "list_assets" - ] - }, - "GetAsset": { - "methods": [ - "get_asset" - ] - }, - "ListAssetActions": { - "methods": [ - "list_asset_actions" - ] - }, - "CreateTask": { - "methods": [ - "create_task" - ] - }, - "UpdateTask": { - "methods": [ - "update_task" - ] - }, - "DeleteTask": { - "methods": [ - "delete_task" - ] - }, - "ListTasks": { - "methods": [ - "list_tasks" - ] - }, - "GetTask": { - "methods": [ - "get_task" - ] - }, - "ListJobs": { - "methods": [ - "list_jobs" - ] - }, - "RunTask": { - "methods": [ - "run_task" - ] - }, - "GetJob": { - "methods": [ - "get_job" - ] - }, - "CancelJob": { - "methods": [ - "cancel_job" - ] - }, - "CreateEnvironment": { - "methods": [ - "create_environment" - ] - }, - "UpdateEnvironment": { - "methods": [ - "update_environment" - ] - }, - "DeleteEnvironment": { - "methods": [ - "delete_environment" - ] - }, - "ListEnvironments": { - "methods": [ - "list_environments" - ] - }, - "GetEnvironment": { - "methods": [ - "get_environment" - ] - }, - "ListSessions": { - "methods": [ - "list_sessions" - ] - } - } - } - } - }, - "CatalogService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::CatalogService::Client", - "rpcs": { - "CreateEntryType": { - "methods": [ - "create_entry_type" - ] - }, - "UpdateEntryType": { - "methods": [ - "update_entry_type" - ] - }, - "DeleteEntryType": { - "methods": [ - "delete_entry_type" - ] - }, - "ListEntryTypes": { - "methods": [ - "list_entry_types" - ] - }, - "GetEntryType": { - "methods": [ - "get_entry_type" - ] - }, - "CreateAspectType": { - "methods": [ - "create_aspect_type" - ] - }, - "UpdateAspectType": { - "methods": [ - "update_aspect_type" - ] - }, - "DeleteAspectType": { - "methods": [ - "delete_aspect_type" - ] - }, - "ListAspectTypes": { - "methods": [ - "list_aspect_types" - ] - }, - "GetAspectType": { - "methods": [ - "get_aspect_type" - ] - }, - "CreateEntryGroup": { - "methods": [ - "create_entry_group" - ] - }, - "UpdateEntryGroup": { - "methods": [ - "update_entry_group" - ] - }, - "DeleteEntryGroup": { - "methods": [ - "delete_entry_group" - ] - }, - "ListEntryGroups": { - "methods": [ - "list_entry_groups" - ] - }, - "GetEntryGroup": { - "methods": [ - "get_entry_group" - ] - }, - "CreateEntry": { - "methods": [ - "create_entry" - ] - }, - "UpdateEntry": { - "methods": [ - "update_entry" - ] - }, - "DeleteEntry": { - "methods": [ - "delete_entry" - ] - }, - "ListEntries": { - "methods": [ - "list_entries" - ] - }, - "GetEntry": { - "methods": [ - "get_entry" - ] - }, - "LookupEntry": { - "methods": [ - "lookup_entry" - ] - }, - "SearchEntries": { - "methods": [ - "search_entries" - ] - } - } - } - } - }, - "ContentService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::ContentService::Client", - "rpcs": { - "CreateContent": { - "methods": [ - "create_content" - ] - }, - "UpdateContent": { - "methods": [ - "update_content" - ] - }, - "DeleteContent": { - "methods": [ - "delete_content" - ] - }, - "GetContent": { - "methods": [ - "get_content" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "ListContent": { - "methods": [ - "list_content" - ] - } - } - } - } - }, - "DataTaxonomyService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client", - "rpcs": { - "CreateDataTaxonomy": { - "methods": [ - "create_data_taxonomy" - ] - }, - "UpdateDataTaxonomy": { - "methods": [ - "update_data_taxonomy" - ] - }, - "DeleteDataTaxonomy": { - "methods": [ - "delete_data_taxonomy" - ] - }, - "ListDataTaxonomies": { - "methods": [ - "list_data_taxonomies" - ] - }, - "GetDataTaxonomy": { - "methods": [ - "get_data_taxonomy" - ] - }, - "CreateDataAttributeBinding": { - "methods": [ - "create_data_attribute_binding" - ] - }, - "UpdateDataAttributeBinding": { - "methods": [ - "update_data_attribute_binding" - ] - }, - "DeleteDataAttributeBinding": { - "methods": [ - "delete_data_attribute_binding" - ] - }, - "ListDataAttributeBindings": { - "methods": [ - "list_data_attribute_bindings" - ] - }, - "GetDataAttributeBinding": { - "methods": [ - "get_data_attribute_binding" - ] - }, - "CreateDataAttribute": { - "methods": [ - "create_data_attribute" - ] - }, - "UpdateDataAttribute": { - "methods": [ - "update_data_attribute" - ] - }, - "DeleteDataAttribute": { - "methods": [ - "delete_data_attribute" - ] - }, - "ListDataAttributes": { - "methods": [ - "list_data_attributes" - ] - }, - "GetDataAttribute": { - "methods": [ - "get_data_attribute" - ] - } - } - } - } - }, - "DataScanService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::DataScanService::Client", - "rpcs": { - "CreateDataScan": { - "methods": [ - "create_data_scan" - ] - }, - "UpdateDataScan": { - "methods": [ - "update_data_scan" - ] - }, - "DeleteDataScan": { - "methods": [ - "delete_data_scan" - ] - }, - "GetDataScan": { - "methods": [ - "get_data_scan" - ] - }, - "ListDataScans": { - "methods": [ - "list_data_scans" - ] - }, - "RunDataScan": { - "methods": [ - "run_data_scan" - ] - }, - "GetDataScanJob": { - "methods": [ - "get_data_scan_job" - ] - }, - "ListDataScanJobs": { - "methods": [ - "list_data_scan_jobs" - ] - }, - "GenerateDataQualityRules": { - "methods": [ - "generate_data_quality_rules" - ] - } - } - } - } - }, - "MetadataService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::MetadataService::Client", - "rpcs": { - "CreateEntity": { - "methods": [ - "create_entity" - ] - }, - "UpdateEntity": { - "methods": [ - "update_entity" - ] - }, - "DeleteEntity": { - "methods": [ - "delete_entity" - ] - }, - "GetEntity": { - "methods": [ - "get_entity" - ] - }, - "ListEntities": { - "methods": [ - "list_entities" - ] - }, - "CreatePartition": { - "methods": [ - "create_partition" - ] - }, - "DeletePartition": { - "methods": [ - "delete_partition" - ] - }, - "GetPartition": { - "methods": [ - "get_partition" - ] - }, - "ListPartitions": { - "methods": [ - "list_partitions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec b/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec deleted file mode 100644 index fa222f4abb34..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/dataplex/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-dataplex-v1" - gem.version = Google::Cloud::Dataplex::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. Note that google-cloud-dataplex-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dataplex instead. See the readme for more details." - gem.summary = "Dataplex API is used to manage the lifecycle of data lakes." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.7" - - gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", ">= 0.7", "< 2.a" - gem.add_dependency "google-iam-v1", ">= 0.7", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb deleted file mode 100644 index 6a853eb65247..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/dataplex/v1" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb deleted file mode 100644 index a3347b7c69df..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/dataplex_service" -require "google/cloud/dataplex/v1/catalog_service" -require "google/cloud/dataplex/v1/content_service" -require "google/cloud/dataplex/v1/data_taxonomy_service" -require "google/cloud/dataplex/v1/data_scan_service" -require "google/cloud/dataplex/v1/metadata_service" -require "google/cloud/dataplex/v1/version" - -module Google - module Cloud - module Dataplex - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/dataplex/v1" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/dataplex/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb deleted file mode 100644 index 86e65c604fd7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/analyze.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/resources_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/dataplex/v1/analyze.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\r\n\x0b\x45nvironment\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#dataplex.googleapis.com/Environment\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x06 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.Environment.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12Z\n\x13infrastructure_spec\x18\x64 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Environment.InfrastructureSpecB\x03\xe0\x41\x02\x12L\n\x0csession_spec\x18\x65 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Environment.SessionSpecB\x03\xe0\x41\x01\x12P\n\x0esession_status\x18\x66 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.Environment.SessionStatusB\x03\xe0\x41\x03\x12H\n\tendpoints\x18\xc8\x01 \x01(\x0b\x32/.google.cloud.dataplex.v1.Environment.EndpointsB\x03\xe0\x41\x03\x1a\xe5\x04\n\x12InfrastructureSpec\x12\x61\n\x07\x63ompute\x18\x32 \x01(\x0b\x32I.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResourcesB\x03\xe0\x41\x01H\x00\x12`\n\x08os_image\x18\x64 \x01(\x0b\x32G.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntimeB\x03\xe0\x41\x02H\x01\x1a\x63\n\x10\x43omputeResources\x12\x19\n\x0c\x64isk_size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\nnode_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1b\n\x0emax_node_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x1a\x8c\x02\n\x0eOsImageRuntime\x12\x1a\n\rimage_version\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0ejava_libraries\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fpython_packages\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12p\n\nproperties\x18\x04 \x03(\x0b\x32W.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.PropertiesEntryB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0b\n\tresourcesB\t\n\x07runtime\x1aj\n\x0bSessionSpec\x12\x39\n\x11max_idle_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12 \n\x13\x65nable_fast_startup\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a$\n\rSessionStatus\x12\x13\n\x06\x61\x63tive\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x35\n\tEndpoints\x12\x16\n\tnotebooks\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03sql\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:y\xea\x41v\n#dataplex.googleapis.com/Environment\x12Oprojects/{project}/locations/{location}/lakes/{lake}/environments/{environment}\"\xa6\x07\n\x07\x43ontent\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Content\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06labels\x18\x06 \x03(\x0b\x32-.google.cloud.dataplex.v1.Content.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\tdata_text\x18\t \x01(\tB\x03\xe0\x41\x02H\x00\x12\x41\n\nsql_script\x18\x64 \x01(\x0b\x32+.google.cloud.dataplex.v1.Content.SqlScriptH\x01\x12>\n\x08notebook\x18\x65 \x01(\x0b\x32*.google.cloud.dataplex.v1.Content.NotebookH\x01\x1a\x91\x01\n\tSqlScript\x12L\n\x06\x65ngine\x18\x01 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.Content.SqlScript.QueryEngineB\x03\xe0\x41\x02\"6\n\x0bQueryEngine\x12\x1c\n\x18QUERY_ENGINE_UNSPECIFIED\x10\x00\x12\t\n\x05SPARK\x10\x02\x1a\x93\x01\n\x08Notebook\x12O\n\x0bkernel_type\x18\x01 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.Content.Notebook.KernelTypeB\x03\xe0\x41\x02\"6\n\nKernelType\x12\x1b\n\x17KERNEL_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PYTHON3\x10\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:l\xea\x41i\n\x1f\x64\x61taplex.googleapis.com/Content\x12\x46projects/{project}/locations/{location}/lakes/{lake}/content/{content}B\x06\n\x04\x64\x61taB\t\n\x07\x63ontent\"\xcd\x02\n\x07Session\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Session\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\x05state\x18\x04 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03:\x89\x01\xea\x41\x85\x01\n\x1f\x64\x61taplex.googleapis.com/Session\x12\x62projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}Bh\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x41nalyzeProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment").msgclass - Environment::InfrastructureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec").msgclass - Environment::InfrastructureSpec::ComputeResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources").msgclass - Environment::InfrastructureSpec::OsImageRuntime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime").msgclass - Environment::SessionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.SessionSpec").msgclass - Environment::SessionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.SessionStatus").msgclass - Environment::Endpoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.Endpoints").msgclass - Content = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content").msgclass - Content::SqlScript = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.SqlScript").msgclass - Content::SqlScript::QueryEngine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.SqlScript.QueryEngine").enummodule - Content::Notebook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.Notebook").msgclass - Content::Notebook::KernelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.Notebook.KernelType").enummodule - Session = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Session").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb deleted file mode 100644 index 2760d6770459..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb +++ /dev/null @@ -1,423 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/config" - -module Google - module Cloud - module Dataplex - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/dataplex/v1/rest" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = Configuration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - - ## - # @private - # Configuration class for the google.cloud.dataplex.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.dataplex.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb deleted file mode 100644 index a3ce27a01b7e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb +++ /dev/null @@ -1,101 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/catalog.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/service_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/dataplex/v1/catalog.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd3\r\n\nAspectType\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.AspectType.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12N\n\rauthorization\x18\x34 \x01(\x0b\x32\x32.google.cloud.dataplex.v1.AspectType.AuthorizationB\x03\xe0\x41\x05\x12U\n\x11metadata_template\x18\x35 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x02\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a\xa4\x07\n\x10MetadataTemplate\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12Q\n\rrecord_fields\x18\x06 \x03(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12Y\n\x0b\x65num_values\x18\x08 \x03(\x0b\x32?.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValueB\x03\xe0\x41\x01\x12M\n\tmap_items\x18\n \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12O\n\x0b\x61rray_items\x18\x0b \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12\x14\n\x07type_id\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08type_ref\x18\r \x01(\tB\x03\xe0\x41\x01\x12[\n\x0b\x63onstraints\x18\x32 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.ConstraintsB\x03\xe0\x41\x01\x12[\n\x0b\x61nnotations\x18\x33 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.AnnotationsB\x03\xe0\x41\x01\x1aK\n\tEnumValue\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ndeprecated\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0b\x43onstraints\x12\x15\n\x08required\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xad\x01\n\x0b\x41nnotations\x12\x17\n\ndeprecated\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdisplay_order\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bstring_type\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rstring_values\x18\x07 \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/AspectType\x12\x41projects/{project}/locations/{location}/aspectTypes/{aspect_type}*\x0b\x61spectTypes2\naspectType\"\xcd\x04\n\nEntryGroup\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.EntryGroup.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/EntryGroup\x12\x41projects/{project}/locations/{location}/entryGroups/{entry_group}*\x0b\x65ntryGroups2\nentryGroup\"\xdc\x06\n\tEntryType\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x06labels\x18\x07 \x03(\x0b\x32/.google.cloud.dataplex.v1.EntryType.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0ctype_aliases\x18\t \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08platform\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06system\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12H\n\x10required_aspects\x18\x32 \x03(\x0b\x32..google.cloud.dataplex.v1.EntryType.AspectInfo\x12M\n\rauthorization\x18\x33 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.EntryType.AuthorizationB\x03\xe0\x41\x05\x1a\x43\n\nAspectInfo\x12\x35\n\x04type\x18\x01 \x01(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:~\xea\x41{\n!dataplex.googleapis.com/EntryType\x12?projects/{project}/locations/{location}/entryTypes/{entry_type}*\nentryTypes2\tentryType\"\x91\x02\n\x06\x41spect\x12\x18\n\x0b\x61spect_type\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12*\n\x04\x64\x61ta\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\x12\x42\n\raspect_source\x18\t \x01(\x0b\x32&.google.cloud.dataplex.v1.AspectSourceB\x03\xe0\x41\x01\"p\n\x0c\x41spectSource\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc4\x04\n\x05\x45ntry\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\nentry_type\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07\x61spects\x18\t \x03(\x0b\x32,.google.cloud.dataplex.v1.Entry.AspectsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0cparent_entry\x18\n \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05\x12!\n\x14\x66ully_qualified_name\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12@\n\x0c\x65ntry_source\x18\x0f \x01(\x0b\x32%.google.cloud.dataplex.v1.EntrySourceB\x03\xe0\x41\x01\x1aP\n\x0c\x41spectsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .google.cloud.dataplex.v1.Aspect:\x02\x38\x01:\x86\x01\xea\x41\x82\x01\n\x1d\x64\x61taplex.googleapis.com/Entry\x12Qprojects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}*\x07\x65ntries2\x05\x65ntry\"\xba\x03\n\x0b\x45ntrySource\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x0e\n\x06system\x18\x02 \x01(\t\x12\x10\n\x08platform\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x41\n\x06labels\x18\x07 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.EntrySource.LabelsEntry\x12\x46\n\tancestors\x18\t \x03(\x0b\x32..google.cloud.dataplex.v1.EntrySource.AncestorB\x03\xe0\x41\x05\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x30\n\x08\x41ncestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xcd\x01\n\x17\x43reateEntryGroupRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x65ntry_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x65ntry_group\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateEntryGroupRequest\x12>\n\x0b\x65ntry_group\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListEntryGroupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListEntryGroupsResponse\x12:\n\x0c\x65ntry_groups\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.EntryGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\"\xc9\x01\n\x16\x43reateEntryTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1a\n\rentry_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\nentry_type\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x16UpdateEntryTypeRequest\x12<\n\nentry_type\x18\x01 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"d\n\x16\x44\x65leteEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n\x15ListEntryTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x16ListEntryTypesResponse\x12\x38\n\x0b\x65ntry_types\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.EntryType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"N\n\x13GetEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\"\xcd\x01\n\x17\x43reateAspectTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x61spect_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x61spect_type\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateAspectTypeRequest\x12>\n\x0b\x61spect_type\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListAspectTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListAspectTypesResponse\x12:\n\x0c\x61spect_types\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.AspectType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\"\x9c\x01\n\x12\x43reateEntryRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x15\n\x08\x65ntry_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x05\x65ntry\x18\x03 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\"\xda\x01\n\x12UpdateEntryRequest\x12\x33\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16\x64\x65lete_missing_aspects\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x61spect_keys\x18\x05 \x03(\tB\x03\xe0\x41\x01\"I\n\x12\x44\x65leteEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\x96\x01\n\x12ListEntriesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"`\n\x13ListEntriesResponse\x12\x30\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n\x0fGetEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\"\xc4\x01\n\x12LookupEntryRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x34\n\x05\x65ntry\x18\x05 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\x99\x01\n\x14SearchEntriesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05scope\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\xf6\x01\n\x13SearchEntriesResult\x12\x17\n\x0flinked_resource\x18\x08 \x01(\t\x12\x37\n\x0e\x64\x61taplex_entry\x18\t \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12H\n\x08snippets\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.SearchEntriesResult.Snippets\x1a\x43\n\x08Snippets\x12\x37\n\x0e\x64\x61taplex_entry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\"\x99\x01\n\x15SearchEntriesResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32-.google.cloud.dataplex.v1.SearchEntriesResult\x12\x12\n\ntotal_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x13\n\x0bunreachable\x18\x04 \x03(\t*Q\n\tEntryView\x12\x1a\n\x16\x45NTRY_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\x12\x07\n\x03\x41LL\x10\x04*p\n\x0eTransferStatus\x12\x1f\n\x1bTRANSFER_STATUS_UNSPECIFIED\x10\x00\x12\x1c\n\x18TRANSFER_STATUS_MIGRATED\x10\x01\x12\x1f\n\x1bTRANSFER_STATUS_TRANSFERRED\x10\x02\x32\x82#\n\x0e\x43\x61talogService\x12\xea\x01\n\x0f\x43reateEntryType\x12\x30.google.cloud.dataplex.v1.CreateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x1fparent,entry_type,entry_type_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/entryTypes:\nentry_type\x12\xec\x01\n\x0fUpdateEntryType\x12\x30.google.cloud.dataplex.v1.UpdateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x16\x65ntry_type,update_mask\x82\xd3\xe4\x93\x02G29/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}:\nentry_type\x12\xce\x01\n\x0f\x44\x65leteEntryType\x12\x30.google.cloud.dataplex.v1.DeleteEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xb4\x01\n\x0eListEntryTypes\x12/.google.cloud.dataplex.v1.ListEntryTypesRequest\x1a\x30.google.cloud.dataplex.v1.ListEntryTypesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/entryTypes\x12\xa1\x01\n\x0cGetEntryType\x12-.google.cloud.dataplex.v1.GetEntryTypeRequest\x1a#.google.cloud.dataplex.v1.EntryType\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xf1\x01\n\x10\x43reateAspectType\x12\x31.google.cloud.dataplex.v1.CreateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41!parent,aspect_type,aspect_type_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/aspectTypes:\x0b\x61spect_type\x12\xf3\x01\n\x10UpdateAspectType\x12\x31.google.cloud.dataplex.v1.UpdateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41\x17\x61spect_type,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}:\x0b\x61spect_type\x12\xd1\x01\n\x10\x44\x65leteAspectType\x12\x31.google.cloud.dataplex.v1.DeleteAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xb8\x01\n\x0fListAspectTypes\x12\x30.google.cloud.dataplex.v1.ListAspectTypesRequest\x1a\x31.google.cloud.dataplex.v1.ListAspectTypesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/aspectTypes\x12\xa5\x01\n\rGetAspectType\x12..google.cloud.dataplex.v1.GetAspectTypeRequest\x1a$.google.cloud.dataplex.v1.AspectType\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xf1\x01\n\x10\x43reateEntryGroup\x12\x31.google.cloud.dataplex.v1.CreateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41!parent,entry_group,entry_group_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/entryGroups:\x0b\x65ntry_group\x12\xf3\x01\n\x10UpdateEntryGroup\x12\x31.google.cloud.dataplex.v1.UpdateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41\x17\x65ntry_group,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}:\x0b\x65ntry_group\x12\xd1\x01\n\x10\x44\x65leteEntryGroup\x12\x31.google.cloud.dataplex.v1.DeleteEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xb8\x01\n\x0fListEntryGroups\x12\x30.google.cloud.dataplex.v1.ListEntryGroupsRequest\x1a\x31.google.cloud.dataplex.v1.ListEntryGroupsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/entryGroups\x12\xa5\x01\n\rGetEntryGroup\x12..google.cloud.dataplex.v1.GetEntryGroupRequest\x1a$.google.cloud.dataplex.v1.EntryGroup\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xbe\x01\n\x0b\x43reateEntry\x12,.google.cloud.dataplex.v1.CreateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"`\xda\x41\x15parent,entry,entry_id\x82\xd3\xe4\x93\x02\x42\"9/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:\x05\x65ntry\x12\xc1\x01\n\x0bUpdateEntry\x12,.google.cloud.dataplex.v1.UpdateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"c\xda\x41\x11\x65ntry,update_mask\x82\xd3\xe4\x93\x02I2@/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/**}:\x05\x65ntry\x12\xa7\x01\n\x0b\x44\x65leteEntry\x12,.google.cloud.dataplex.v1.DeleteEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\xb6\x01\n\x0bListEntries\x12,.google.cloud.dataplex.v1.ListEntriesRequest\x1a-.google.cloud.dataplex.v1.ListEntriesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/entryGroups/*}/entries\x12\xa1\x01\n\x08GetEntry\x12).google.cloud.dataplex.v1.GetEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\x93\x01\n\x0bLookupEntry\x12,.google.cloud.dataplex.v1.LookupEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*}:lookupEntry\x12\xb6\x01\n\rSearchEntries\x12..google.cloud.dataplex.v1.SearchEntriesRequest\x1a/.google.cloud.dataplex.v1.SearchEntriesResponse\"D\xda\x41\nname,query\x82\xd3\xe4\x93\x02\x31\"//v1/{name=projects/*/locations/*}:searchEntries\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbc\x01\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x43\x61talogProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xaa\x02\x18Google.Cloud.Dataplex.V1\xca\x02\x18Google\\Cloud\\Dataplex\\V1\xea\x02\x1bGoogle::Cloud::Dataplex::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.Struct", "google/protobuf/struct.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - AspectType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType").msgclass - AspectType::Authorization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.Authorization").msgclass - AspectType::MetadataTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate").msgclass - AspectType::MetadataTemplate::EnumValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue").msgclass - AspectType::MetadataTemplate::Constraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints").msgclass - AspectType::MetadataTemplate::Annotations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations").msgclass - EntryGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryGroup").msgclass - EntryType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryType").msgclass - EntryType::AspectInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryType.AspectInfo").msgclass - EntryType::Authorization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryType.Authorization").msgclass - Aspect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Aspect").msgclass - AspectSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectSource").msgclass - Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Entry").msgclass - EntrySource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntrySource").msgclass - EntrySource::Ancestor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntrySource.Ancestor").msgclass - CreateEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEntryGroupRequest").msgclass - UpdateEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEntryGroupRequest").msgclass - DeleteEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEntryGroupRequest").msgclass - ListEntryGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryGroupsRequest").msgclass - ListEntryGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryGroupsResponse").msgclass - GetEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEntryGroupRequest").msgclass - CreateEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEntryTypeRequest").msgclass - UpdateEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEntryTypeRequest").msgclass - DeleteEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEntryTypeRequest").msgclass - ListEntryTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryTypesRequest").msgclass - ListEntryTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryTypesResponse").msgclass - GetEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEntryTypeRequest").msgclass - CreateAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateAspectTypeRequest").msgclass - UpdateAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateAspectTypeRequest").msgclass - DeleteAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteAspectTypeRequest").msgclass - ListAspectTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAspectTypesRequest").msgclass - ListAspectTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAspectTypesResponse").msgclass - GetAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetAspectTypeRequest").msgclass - CreateEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEntryRequest").msgclass - UpdateEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEntryRequest").msgclass - DeleteEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEntryRequest").msgclass - ListEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntriesRequest").msgclass - ListEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntriesResponse").msgclass - GetEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEntryRequest").msgclass - LookupEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.LookupEntryRequest").msgclass - SearchEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesRequest").msgclass - SearchEntriesResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesResult").msgclass - SearchEntriesResult::Snippets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesResult.Snippets").msgclass - SearchEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesResponse").msgclass - EntryView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryView").enummodule - TransferStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.TransferStatus").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb deleted file mode 100644 index 23ba3815dfd4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" - -require "google/cloud/dataplex/v1/catalog_service/credentials" -require "google/cloud/dataplex/v1/catalog_service/paths" -require "google/cloud/dataplex/v1/catalog_service/operations" -require "google/cloud/dataplex/v1/catalog_service/client" -require "google/cloud/dataplex/v1/catalog_service/rest" - -module Google - module Cloud - module Dataplex - module 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. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1/catalog_service" - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/dataplex/v1/catalog_service/rest" - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - module CatalogService - end - end - end - end -end - -helper_path = ::File.join __dir__, "catalog_service", "helpers.rb" -require "google/cloud/dataplex/v1/catalog_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb deleted file mode 100644 index 7a7b990936b5..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb +++ /dev/null @@ -1,2797 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/catalog_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - ## - # Client for the CatalogService service. - # - # 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. - # - class Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :catalog_service_stub - - ## - # Configure the CatalogService Client class. - # - # See {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CatalogService clients - # ::Google::Cloud::Dataplex::V1::CatalogService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_entry_type.timeout = 60.0 - - default_config.rpcs.update_entry_type.timeout = 60.0 - - default_config.rpcs.delete_entry_type.timeout = 60.0 - - default_config.rpcs.list_entry_types.timeout = 60.0 - default_config.rpcs.list_entry_types.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry_type.timeout = 60.0 - default_config.rpcs.get_entry_type.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_aspect_type.timeout = 60.0 - - default_config.rpcs.update_aspect_type.timeout = 60.0 - - default_config.rpcs.delete_aspect_type.timeout = 60.0 - - default_config.rpcs.list_aspect_types.timeout = 60.0 - default_config.rpcs.list_aspect_types.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_aspect_type.timeout = 60.0 - default_config.rpcs.get_aspect_type.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_entry_group.timeout = 60.0 - - default_config.rpcs.update_entry_group.timeout = 60.0 - - default_config.rpcs.delete_entry_group.timeout = 60.0 - - default_config.rpcs.list_entry_groups.timeout = 60.0 - default_config.rpcs.list_entry_groups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry_group.timeout = 60.0 - default_config.rpcs.get_entry_group.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_entry.timeout = 60.0 - - default_config.rpcs.update_entry.timeout = 60.0 - default_config.rpcs.update_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.delete_entry.timeout = 60.0 - - default_config.rpcs.list_entries.timeout = 20.0 - default_config.rpcs.list_entries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry.timeout = 20.0 - default_config.rpcs.get_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.lookup_entry.timeout = 20.0 - default_config.rpcs.lookup_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.search_entries.timeout = 60.0 - default_config.rpcs.search_entries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CatalogService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @catalog_service_stub.universe_domain - end - - ## - # Create a new CatalogService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CatalogService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/dataplex/v1/catalog_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @catalog_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dataplex::V1::CatalogService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @catalog_service_stub.endpoint - config.universe_domain = @catalog_service_stub.universe_domain - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @catalog_service_stub.endpoint - config.universe_domain = @catalog_service_stub.universe_domain - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::CatalogService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Creates an EntryType - # - # @overload create_entry_type(request, options = nil) - # Pass arguments to `create_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_entry_type(parent: nil, entry_type_id: nil, entry_type: nil, validate_only: nil) - # Pass arguments to `create_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the EntryType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a GCP region. - # @param entry_type_id [::String] - # Required. EntryType identifier. - # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] - # Required. EntryType Resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new - # - # # Call the create_entry_type method. - # result = client.create_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_entry_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :create_entry_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a EntryType resource. - # - # @overload update_entry_type(request, options = nil) - # Pass arguments to `update_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_entry_type(entry_type: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] - # Required. EntryType Resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new - # - # # Call the update_entry_type method. - # result = client.update_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.entry_type&.name - header_params["entry_type.name"] = request.entry_type.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_entry_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :update_entry_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a EntryType resource. - # - # @overload delete_entry_type(request, options = nil) - # Pass arguments to `delete_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_entry_type(name: nil, etag: nil) - # Pass arguments to `delete_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryTypeRequest method returns an ABORTED error response - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new - # - # # Call the delete_entry_type method. - # result = client.delete_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_entry_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :delete_entry_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists EntryType resources in a project and location. - # - # @overload list_entry_types(request, options = nil) - # Pass arguments to `list_entry_types` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntryTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_entry_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_entry_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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 order_by [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new - # - # # Call the list_entry_types method. - # result = client.list_entry_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. - # p item - # end - # - def list_entry_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_entry_types.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_entry_types.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_entry_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :list_entry_types, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entry_types, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a EntryType resource. - # - # @overload get_entry_type(request, options = nil) - # Pass arguments to `get_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_entry_type(name: nil) - # Pass arguments to `get_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryType] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new - # - # # Call the get_entry_type method. - # result = client.get_entry_type request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. - # p result - # - def get_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_entry_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :get_entry_type, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an AspectType - # - # @overload create_aspect_type(request, options = nil) - # Pass arguments to `create_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_aspect_type(parent: nil, aspect_type_id: nil, aspect_type: nil, validate_only: nil) - # Pass arguments to `create_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the AspectType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a GCP region. - # @param aspect_type_id [::String] - # Required. AspectType identifier. - # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] - # Required. AspectType Resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new - # - # # Call the create_aspect_type method. - # result = client.create_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_aspect_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :create_aspect_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a AspectType resource. - # - # @overload update_aspect_type(request, options = nil) - # Pass arguments to `update_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_aspect_type(aspect_type: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] - # Required. AspectType Resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new - # - # # Call the update_aspect_type method. - # result = client.update_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.aspect_type&.name - header_params["aspect_type.name"] = request.aspect_type.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_aspect_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :update_aspect_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a AspectType resource. - # - # @overload delete_aspect_type(request, options = nil) - # Pass arguments to `delete_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_aspect_type(name: nil, etag: nil) - # Pass arguments to `delete_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteAspectTypeRequest method returns an ABORTED error response - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new - # - # # Call the delete_aspect_type method. - # result = client.delete_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_aspect_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :delete_aspect_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists AspectType resources in a project and location. - # - # @overload list_aspect_types(request, options = nil) - # Pass arguments to `list_aspect_types` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAspectTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_aspect_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_aspect_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # 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. - # @param page_token [::String] - # 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. - # @param filter [::String] - # 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 order_by [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new - # - # # Call the list_aspect_types method. - # result = client.list_aspect_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. - # p item - # end - # - def list_aspect_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_aspect_types.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_aspect_types.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_aspect_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :list_aspect_types, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_aspect_types, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a AspectType resource. - # - # @overload get_aspect_type(request, options = nil) - # Pass arguments to `get_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_aspect_type(name: nil) - # Pass arguments to `get_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::AspectType] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new - # - # # Call the get_aspect_type method. - # result = client.get_aspect_type request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. - # p result - # - def get_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_aspect_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :get_aspect_type, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an EntryGroup - # - # @overload create_entry_group(request, options = nil) - # Pass arguments to `create_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil, validate_only: nil) - # Pass arguments to `create_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 entry_group_id [::String] - # Required. EntryGroup identifier. - # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] - # Required. EntryGroup Resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new - # - # # Call the create_entry_group method. - # result = client.create_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_entry_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :create_entry_group, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a EntryGroup resource. - # - # @overload update_entry_group(request, options = nil) - # Pass arguments to `update_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_entry_group(entry_group: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] - # Required. EntryGroup Resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new - # - # # Call the update_entry_group method. - # result = client.update_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.entry_group&.name - header_params["entry_group.name"] = request.entry_group.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_entry_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :update_entry_group, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a EntryGroup resource. - # - # @overload delete_entry_group(request, options = nil) - # Pass arguments to `delete_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_entry_group(name: nil, etag: nil) - # Pass arguments to `delete_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryGroupRequest method returns an ABORTED error response - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new - # - # # Call the delete_entry_group method. - # result = client.delete_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_entry_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :delete_entry_group, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists EntryGroup resources in a project and location. - # - # @overload list_entry_groups(request, options = nil) - # Pass arguments to `list_entry_groups` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_entry_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_entry_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # 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. - # @param page_token [::String] - # 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. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new - # - # # Call the list_entry_groups method. - # result = client.list_entry_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. - # p item - # end - # - def list_entry_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_entry_groups.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_entry_groups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_entry_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :list_entry_groups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entry_groups, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a EntryGroup resource. - # - # @overload get_entry_group(request, options = nil) - # Pass arguments to `get_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_entry_group(name: nil) - # Pass arguments to `get_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryGroup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new - # - # # Call the get_entry_group method. - # result = client.get_entry_group request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. - # p result - # - def get_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_entry_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :get_entry_group, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an Entry. - # - # @overload create_entry(request, options = nil) - # Pass arguments to `create_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_entry(parent: nil, entry_id: nil, entry: nil) - # Pass arguments to `create_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @param entry_id [::String] - # 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 - # `//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 - # Cloud. - # - # The maximum size of the field is 4000 characters. - # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] - # Required. Entry resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new - # - # # Call the create_entry method. - # result = client.create_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def create_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :create_entry, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an Entry. - # - # @overload update_entry(request, options = nil) - # Pass arguments to `update_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_entry(entry: nil, update_mask: nil, allow_missing: nil, delete_missing_aspects: nil, aspect_keys: nil) - # Pass arguments to `update_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] - # Required. Entry resource. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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. - # @param allow_missing [::Boolean] - # Optional. If set to true and the entry does not exist, it will be created. - # @param delete_missing_aspects [::Boolean] - # 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. - # @param aspect_keys [::Array<::String>] - # 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 - # `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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new - # - # # Call the update_entry method. - # result = client.update_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def update_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.entry&.name - header_params["entry.name"] = request.entry.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :update_entry, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an Entry. - # - # @overload delete_entry(request, options = nil) - # Pass arguments to `delete_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_entry(name: nil) - # Pass arguments to `delete_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new - # - # # Call the delete_entry method. - # result = client.delete_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def delete_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :delete_entry, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists entries within an entry group. - # - # @overload list_entries(request, options = nil) - # Pass arguments to `list_entries` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_entries(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_entries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @param page_size [::Integer] - # @param page_token [::String] - # Optional. The pagination token returned by a previous request. - # @param filter [::String] - # 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" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new - # - # # Call the list_entries method. - # result = client.list_entries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. - # p item - # end - # - def list_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_entries.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_entries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :list_entries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entries, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a single entry. - # - # @overload get_entry(request, options = nil) - # Pass arguments to `get_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_entry(name: nil, view: nil, aspect_types: nil, paths: nil) - # Pass arguments to `get_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @param view [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View for controlling which parts of an entry are to be returned. - # @param aspect_types [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # Only works if the CUSTOM view is selected. - # @param paths [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. Only works if the CUSTOM view is selected. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryRequest.new - # - # # Call the get_entry method. - # result = client.get_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def get_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :get_entry, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Looks up a single entry. - # - # @overload lookup_entry(request, options = nil) - # Pass arguments to `lookup_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::LookupEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload lookup_entry(name: nil, view: nil, aspect_types: nil, paths: nil, entry: nil) - # Pass arguments to `lookup_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/{location}`. - # @param view [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View for controlling which parts of an entry are to be returned. - # @param aspect_types [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # Only works if the CUSTOM view is selected. - # @param paths [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. Only works if the CUSTOM view is selected. - # @param entry [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new - # - # # Call the lookup_entry method. - # result = client.lookup_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def lookup_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.lookup_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.lookup_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.lookup_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :lookup_entry, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Searches for entries matching given query and scope. - # - # @overload search_entries(request, options = nil) - # Pass arguments to `search_entries` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::SearchEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil) - # Pass arguments to `search_entries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/{location}`. - # @param query [::String] - # Required. The query against which entries in scope should be matched. - # @param page_size [::Integer] - # Optional. Pagination. - # @param page_token [::String] - # @param order_by [::String] - # Optional. Ordering of the results. Supported options to be added later. - # @param scope [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new - # - # # Call the search_entries method. - # result = client.search_entries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. - # p item - # end - # - def search_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::SearchEntriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.search_entries.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_entries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :search_entries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :search_entries, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CatalogService API. - # - # This class represents the configuration for CatalogService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_entry_type to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::CatalogService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_entry_type.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_entry_type.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CatalogService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry_type - ## - # RPC-specific configuration for `update_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry_type - ## - # RPC-specific configuration for `delete_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry_type - ## - # RPC-specific configuration for `list_entry_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entry_types - ## - # RPC-specific configuration for `get_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry_type - ## - # RPC-specific configuration for `create_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :create_aspect_type - ## - # RPC-specific configuration for `update_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :update_aspect_type - ## - # RPC-specific configuration for `delete_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_aspect_type - ## - # RPC-specific configuration for `list_aspect_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_aspect_types - ## - # RPC-specific configuration for `get_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_aspect_type - ## - # RPC-specific configuration for `create_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry_group - ## - # RPC-specific configuration for `update_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry_group - ## - # RPC-specific configuration for `delete_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry_group - ## - # RPC-specific configuration for `list_entry_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entry_groups - ## - # RPC-specific configuration for `get_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry_group - ## - # RPC-specific configuration for `create_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry - ## - # RPC-specific configuration for `update_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry - ## - # RPC-specific configuration for `delete_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry - ## - # RPC-specific configuration for `list_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entries - ## - # RPC-specific configuration for `get_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry - ## - # RPC-specific configuration for `lookup_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_entry - ## - # RPC-specific configuration for `search_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :search_entries - - # @private - def initialize parent_rpcs = nil - create_entry_type_config = parent_rpcs.create_entry_type if parent_rpcs.respond_to? :create_entry_type - @create_entry_type = ::Gapic::Config::Method.new create_entry_type_config - update_entry_type_config = parent_rpcs.update_entry_type if parent_rpcs.respond_to? :update_entry_type - @update_entry_type = ::Gapic::Config::Method.new update_entry_type_config - delete_entry_type_config = parent_rpcs.delete_entry_type if parent_rpcs.respond_to? :delete_entry_type - @delete_entry_type = ::Gapic::Config::Method.new delete_entry_type_config - list_entry_types_config = parent_rpcs.list_entry_types if parent_rpcs.respond_to? :list_entry_types - @list_entry_types = ::Gapic::Config::Method.new list_entry_types_config - get_entry_type_config = parent_rpcs.get_entry_type if parent_rpcs.respond_to? :get_entry_type - @get_entry_type = ::Gapic::Config::Method.new get_entry_type_config - create_aspect_type_config = parent_rpcs.create_aspect_type if parent_rpcs.respond_to? :create_aspect_type - @create_aspect_type = ::Gapic::Config::Method.new create_aspect_type_config - update_aspect_type_config = parent_rpcs.update_aspect_type if parent_rpcs.respond_to? :update_aspect_type - @update_aspect_type = ::Gapic::Config::Method.new update_aspect_type_config - delete_aspect_type_config = parent_rpcs.delete_aspect_type if parent_rpcs.respond_to? :delete_aspect_type - @delete_aspect_type = ::Gapic::Config::Method.new delete_aspect_type_config - list_aspect_types_config = parent_rpcs.list_aspect_types if parent_rpcs.respond_to? :list_aspect_types - @list_aspect_types = ::Gapic::Config::Method.new list_aspect_types_config - get_aspect_type_config = parent_rpcs.get_aspect_type if parent_rpcs.respond_to? :get_aspect_type - @get_aspect_type = ::Gapic::Config::Method.new get_aspect_type_config - create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group - @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config - update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group - @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config - delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group - @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config - list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups - @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config - get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group - @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config - create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry - @create_entry = ::Gapic::Config::Method.new create_entry_config - update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry - @update_entry = ::Gapic::Config::Method.new update_entry_config - delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry - @delete_entry = ::Gapic::Config::Method.new delete_entry_config - list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries - @list_entries = ::Gapic::Config::Method.new list_entries_config - get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry - @get_entry = ::Gapic::Config::Method.new get_entry_config - lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry - @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config - search_entries_config = parent_rpcs.search_entries if parent_rpcs.respond_to? :search_entries - @search_entries = ::Gapic::Config::Method.new search_entries_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb deleted file mode 100644 index 1b328b2e7752..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - # Credentials for the CatalogService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb deleted file mode 100644 index 87e2bfd1d4a0..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb +++ /dev/null @@ -1,801 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CatalogService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CatalogService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb deleted file mode 100644 index 465f22f78019..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - # Path helper methods for the CatalogService API. - module Paths - ## - # Create a fully-qualified AspectType resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/aspectTypes/{aspect_type}` - # - # @param project [String] - # @param location [String] - # @param aspect_type [String] - # - # @return [::String] - def aspect_type_path project:, location:, aspect_type: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/aspectTypes/#{aspect_type}" - end - - ## - # Create a fully-qualified Entry resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}` - # - # @param project [String] - # @param location [String] - # @param entry_group [String] - # @param entry [String] - # - # @return [::String] - def entry_path project:, location:, entry_group:, entry: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "entry_group cannot contain /" if entry_group.to_s.include? "/" - - "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}/entries/#{entry}" - end - - ## - # Create a fully-qualified EntryGroup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/entryGroups/{entry_group}` - # - # @param project [String] - # @param location [String] - # @param entry_group [String] - # - # @return [::String] - def entry_group_path project:, location:, entry_group: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}" - end - - ## - # Create a fully-qualified EntryType resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/entryTypes/{entry_type}` - # - # @param project [String] - # @param location [String] - # @param entry_type [String] - # - # @return [::String] - def entry_type_path project:, location:, entry_type: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/entryTypes/#{entry_type}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb deleted file mode 100644 index 364eb0c5e5a8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/catalog_service/credentials" -require "google/cloud/dataplex/v1/catalog_service/paths" -require "google/cloud/dataplex/v1/catalog_service/rest/operations" -require "google/cloud/dataplex/v1/catalog_service/rest/client" - -module Google - module Cloud - module Dataplex - module 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. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/catalog_service/rest" - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - module CatalogService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/catalog_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb deleted file mode 100644 index 398eb9db3daa..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +++ /dev/null @@ -1,2622 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/catalog_pb" -require "google/cloud/dataplex/v1/catalog_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - module Rest - ## - # REST client for the CatalogService service. - # - # 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. - # - class Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :catalog_service_stub - - ## - # Configure the CatalogService Client class. - # - # See {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CatalogService clients - # ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_entry_type.timeout = 60.0 - - default_config.rpcs.update_entry_type.timeout = 60.0 - - default_config.rpcs.delete_entry_type.timeout = 60.0 - - default_config.rpcs.list_entry_types.timeout = 60.0 - default_config.rpcs.list_entry_types.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry_type.timeout = 60.0 - default_config.rpcs.get_entry_type.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_aspect_type.timeout = 60.0 - - default_config.rpcs.update_aspect_type.timeout = 60.0 - - default_config.rpcs.delete_aspect_type.timeout = 60.0 - - default_config.rpcs.list_aspect_types.timeout = 60.0 - default_config.rpcs.list_aspect_types.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_aspect_type.timeout = 60.0 - default_config.rpcs.get_aspect_type.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_entry_group.timeout = 60.0 - - default_config.rpcs.update_entry_group.timeout = 60.0 - - default_config.rpcs.delete_entry_group.timeout = 60.0 - - default_config.rpcs.list_entry_groups.timeout = 60.0 - default_config.rpcs.list_entry_groups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry_group.timeout = 60.0 - default_config.rpcs.get_entry_group.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_entry.timeout = 60.0 - - default_config.rpcs.update_entry.timeout = 60.0 - default_config.rpcs.update_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.delete_entry.timeout = 60.0 - - default_config.rpcs.list_entries.timeout = 20.0 - default_config.rpcs.list_entries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry.timeout = 20.0 - default_config.rpcs.get_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.lookup_entry.timeout = 20.0 - default_config.rpcs.lookup_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.search_entries.timeout = 60.0 - default_config.rpcs.search_entries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CatalogService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @catalog_service_stub.universe_domain - end - - ## - # Create a new CatalogService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CatalogService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @catalog_service_stub = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @catalog_service_stub.endpoint - config.universe_domain = @catalog_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @catalog_service_stub.endpoint - config.universe_domain = @catalog_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::CatalogService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Creates an EntryType - # - # @overload create_entry_type(request, options = nil) - # Pass arguments to `create_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_entry_type(parent: nil, entry_type_id: nil, entry_type: nil, validate_only: nil) - # Pass arguments to `create_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the EntryType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a GCP region. - # @param entry_type_id [::String] - # Required. EntryType identifier. - # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] - # Required. EntryType Resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new - # - # # Call the create_entry_type method. - # result = client.create_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_entry_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.create_entry_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a EntryType resource. - # - # @overload update_entry_type(request, options = nil) - # Pass arguments to `update_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_entry_type(entry_type: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] - # Required. EntryType Resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new - # - # # Call the update_entry_type method. - # result = client.update_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_entry_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.update_entry_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a EntryType resource. - # - # @overload delete_entry_type(request, options = nil) - # Pass arguments to `delete_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_entry_type(name: nil, etag: nil) - # Pass arguments to `delete_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryTypeRequest method returns an ABORTED error response - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new - # - # # Call the delete_entry_type method. - # result = client.delete_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_entry_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.delete_entry_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists EntryType resources in a project and location. - # - # @overload list_entry_types(request, options = nil) - # Pass arguments to `list_entry_types` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntryTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_entry_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_entry_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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 order_by [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new - # - # # Call the list_entry_types method. - # result = client.list_entry_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. - # p item - # end - # - def list_entry_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_entry_types.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_entry_types.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_entry_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.list_entry_types request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a EntryType resource. - # - # @overload get_entry_type(request, options = nil) - # Pass arguments to `get_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_entry_type(name: nil) - # Pass arguments to `get_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new - # - # # Call the get_entry_type method. - # result = client.get_entry_type request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. - # p result - # - def get_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_entry_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.get_entry_type request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an AspectType - # - # @overload create_aspect_type(request, options = nil) - # Pass arguments to `create_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_aspect_type(parent: nil, aspect_type_id: nil, aspect_type: nil, validate_only: nil) - # Pass arguments to `create_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the AspectType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a GCP region. - # @param aspect_type_id [::String] - # Required. AspectType identifier. - # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] - # Required. AspectType Resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new - # - # # Call the create_aspect_type method. - # result = client.create_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_aspect_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.create_aspect_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a AspectType resource. - # - # @overload update_aspect_type(request, options = nil) - # Pass arguments to `update_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_aspect_type(aspect_type: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] - # Required. AspectType Resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new - # - # # Call the update_aspect_type method. - # result = client.update_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_aspect_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.update_aspect_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a AspectType resource. - # - # @overload delete_aspect_type(request, options = nil) - # Pass arguments to `delete_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_aspect_type(name: nil, etag: nil) - # Pass arguments to `delete_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteAspectTypeRequest method returns an ABORTED error response - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new - # - # # Call the delete_aspect_type method. - # result = client.delete_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_aspect_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.delete_aspect_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists AspectType resources in a project and location. - # - # @overload list_aspect_types(request, options = nil) - # Pass arguments to `list_aspect_types` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAspectTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_aspect_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_aspect_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # 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. - # @param page_token [::String] - # 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. - # @param filter [::String] - # 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 order_by [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new - # - # # Call the list_aspect_types method. - # result = client.list_aspect_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. - # p item - # end - # - def list_aspect_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_aspect_types.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_aspect_types.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_aspect_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.list_aspect_types request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a AspectType resource. - # - # @overload get_aspect_type(request, options = nil) - # Pass arguments to `get_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_aspect_type(name: nil) - # Pass arguments to `get_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::AspectType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new - # - # # Call the get_aspect_type method. - # result = client.get_aspect_type request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. - # p result - # - def get_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_aspect_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.get_aspect_type request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an EntryGroup - # - # @overload create_entry_group(request, options = nil) - # Pass arguments to `create_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil, validate_only: nil) - # Pass arguments to `create_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 entry_group_id [::String] - # Required. EntryGroup identifier. - # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] - # Required. EntryGroup Resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new - # - # # Call the create_entry_group method. - # result = client.create_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_entry_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.create_entry_group request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a EntryGroup resource. - # - # @overload update_entry_group(request, options = nil) - # Pass arguments to `update_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_entry_group(entry_group: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] - # Required. EntryGroup Resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new - # - # # Call the update_entry_group method. - # result = client.update_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_entry_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.update_entry_group request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a EntryGroup resource. - # - # @overload delete_entry_group(request, options = nil) - # Pass arguments to `delete_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_entry_group(name: nil, etag: nil) - # Pass arguments to `delete_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryGroupRequest method returns an ABORTED error response - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new - # - # # Call the delete_entry_group method. - # result = client.delete_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_entry_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.delete_entry_group request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists EntryGroup resources in a project and location. - # - # @overload list_entry_groups(request, options = nil) - # Pass arguments to `list_entry_groups` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_entry_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_entry_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # 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. - # @param page_token [::String] - # 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. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new - # - # # Call the list_entry_groups method. - # result = client.list_entry_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. - # p item - # end - # - def list_entry_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_entry_groups.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_entry_groups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_entry_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.list_entry_groups request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a EntryGroup resource. - # - # @overload get_entry_group(request, options = nil) - # Pass arguments to `get_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_entry_group(name: nil) - # Pass arguments to `get_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new - # - # # Call the get_entry_group method. - # result = client.get_entry_group request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. - # p result - # - def get_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_entry_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.get_entry_group request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an Entry. - # - # @overload create_entry(request, options = nil) - # Pass arguments to `create_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_entry(parent: nil, entry_id: nil, entry: nil) - # Pass arguments to `create_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @param entry_id [::String] - # 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 - # `//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 - # Cloud. - # - # The maximum size of the field is 4000 characters. - # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] - # Required. Entry resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new - # - # # Call the create_entry method. - # result = client.create_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def create_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.create_entry request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an Entry. - # - # @overload update_entry(request, options = nil) - # Pass arguments to `update_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_entry(entry: nil, update_mask: nil, allow_missing: nil, delete_missing_aspects: nil, aspect_keys: nil) - # Pass arguments to `update_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] - # Required. Entry resource. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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. - # @param allow_missing [::Boolean] - # Optional. If set to true and the entry does not exist, it will be created. - # @param delete_missing_aspects [::Boolean] - # 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. - # @param aspect_keys [::Array<::String>] - # 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 - # `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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new - # - # # Call the update_entry method. - # result = client.update_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def update_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.update_entry request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an Entry. - # - # @overload delete_entry(request, options = nil) - # Pass arguments to `delete_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_entry(name: nil) - # Pass arguments to `delete_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new - # - # # Call the delete_entry method. - # result = client.delete_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def delete_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.delete_entry request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists entries within an entry group. - # - # @overload list_entries(request, options = nil) - # Pass arguments to `list_entries` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_entries(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_entries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @param page_size [::Integer] - # @param page_token [::String] - # Optional. The pagination token returned by a previous request. - # @param filter [::String] - # 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" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new - # - # # Call the list_entries method. - # result = client.list_entries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. - # p item - # end - # - def list_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_entries.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_entries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.list_entries request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_entries, "entries", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a single entry. - # - # @overload get_entry(request, options = nil) - # Pass arguments to `get_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_entry(name: nil, view: nil, aspect_types: nil, paths: nil) - # Pass arguments to `get_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @param view [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View for controlling which parts of an entry are to be returned. - # @param aspect_types [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # Only works if the CUSTOM view is selected. - # @param paths [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. Only works if the CUSTOM view is selected. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryRequest.new - # - # # Call the get_entry method. - # result = client.get_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def get_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.get_entry request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Looks up a single entry. - # - # @overload lookup_entry(request, options = nil) - # Pass arguments to `lookup_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::LookupEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload lookup_entry(name: nil, view: nil, aspect_types: nil, paths: nil, entry: nil) - # Pass arguments to `lookup_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/{location}`. - # @param view [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View for controlling which parts of an entry are to be returned. - # @param aspect_types [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # Only works if the CUSTOM view is selected. - # @param paths [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. Only works if the CUSTOM view is selected. - # @param entry [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new - # - # # Call the lookup_entry method. - # result = client.lookup_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def lookup_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.lookup_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.lookup_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.lookup_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.lookup_entry request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Searches for entries matching given query and scope. - # - # @overload search_entries(request, options = nil) - # Pass arguments to `search_entries` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::SearchEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil) - # Pass arguments to `search_entries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/{location}`. - # @param query [::String] - # Required. The query against which entries in scope should be matched. - # @param page_size [::Integer] - # Optional. Pagination. - # @param page_token [::String] - # @param order_by [::String] - # Optional. Ordering of the results. Supported options to be added later. - # @param scope [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new - # - # # Call the search_entries method. - # result = client.search_entries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. - # p item - # end - # - def search_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::SearchEntriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.search_entries.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.search_entries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.search_entries request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CatalogService REST API. - # - # This class represents the configuration for CatalogService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_entry_type to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_entry_type.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_entry_type.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the CatalogService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry_type - ## - # RPC-specific configuration for `update_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry_type - ## - # RPC-specific configuration for `delete_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry_type - ## - # RPC-specific configuration for `list_entry_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entry_types - ## - # RPC-specific configuration for `get_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry_type - ## - # RPC-specific configuration for `create_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :create_aspect_type - ## - # RPC-specific configuration for `update_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :update_aspect_type - ## - # RPC-specific configuration for `delete_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_aspect_type - ## - # RPC-specific configuration for `list_aspect_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_aspect_types - ## - # RPC-specific configuration for `get_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_aspect_type - ## - # RPC-specific configuration for `create_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry_group - ## - # RPC-specific configuration for `update_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry_group - ## - # RPC-specific configuration for `delete_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry_group - ## - # RPC-specific configuration for `list_entry_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entry_groups - ## - # RPC-specific configuration for `get_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry_group - ## - # RPC-specific configuration for `create_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry - ## - # RPC-specific configuration for `update_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry - ## - # RPC-specific configuration for `delete_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry - ## - # RPC-specific configuration for `list_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entries - ## - # RPC-specific configuration for `get_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry - ## - # RPC-specific configuration for `lookup_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_entry - ## - # RPC-specific configuration for `search_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :search_entries - - # @private - def initialize parent_rpcs = nil - create_entry_type_config = parent_rpcs.create_entry_type if parent_rpcs.respond_to? :create_entry_type - @create_entry_type = ::Gapic::Config::Method.new create_entry_type_config - update_entry_type_config = parent_rpcs.update_entry_type if parent_rpcs.respond_to? :update_entry_type - @update_entry_type = ::Gapic::Config::Method.new update_entry_type_config - delete_entry_type_config = parent_rpcs.delete_entry_type if parent_rpcs.respond_to? :delete_entry_type - @delete_entry_type = ::Gapic::Config::Method.new delete_entry_type_config - list_entry_types_config = parent_rpcs.list_entry_types if parent_rpcs.respond_to? :list_entry_types - @list_entry_types = ::Gapic::Config::Method.new list_entry_types_config - get_entry_type_config = parent_rpcs.get_entry_type if parent_rpcs.respond_to? :get_entry_type - @get_entry_type = ::Gapic::Config::Method.new get_entry_type_config - create_aspect_type_config = parent_rpcs.create_aspect_type if parent_rpcs.respond_to? :create_aspect_type - @create_aspect_type = ::Gapic::Config::Method.new create_aspect_type_config - update_aspect_type_config = parent_rpcs.update_aspect_type if parent_rpcs.respond_to? :update_aspect_type - @update_aspect_type = ::Gapic::Config::Method.new update_aspect_type_config - delete_aspect_type_config = parent_rpcs.delete_aspect_type if parent_rpcs.respond_to? :delete_aspect_type - @delete_aspect_type = ::Gapic::Config::Method.new delete_aspect_type_config - list_aspect_types_config = parent_rpcs.list_aspect_types if parent_rpcs.respond_to? :list_aspect_types - @list_aspect_types = ::Gapic::Config::Method.new list_aspect_types_config - get_aspect_type_config = parent_rpcs.get_aspect_type if parent_rpcs.respond_to? :get_aspect_type - @get_aspect_type = ::Gapic::Config::Method.new get_aspect_type_config - create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group - @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config - update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group - @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config - delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group - @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config - list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups - @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config - get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group - @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config - create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry - @create_entry = ::Gapic::Config::Method.new create_entry_config - update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry - @update_entry = ::Gapic::Config::Method.new update_entry_config - delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry - @delete_entry = ::Gapic::Config::Method.new delete_entry_config - list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries - @list_entries = ::Gapic::Config::Method.new list_entries_config - get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry - @get_entry = ::Gapic::Config::Method.new get_entry_config - lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry - @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config - search_entries_config = parent_rpcs.search_entries if parent_rpcs.respond_to? :search_entries - @search_entries = ::Gapic::Config::Method.new search_entries_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb deleted file mode 100644 index 989b9b05ba02..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb +++ /dev/null @@ -1,895 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CatalogService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CatalogService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb deleted file mode 100644 index 260110930560..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb +++ /dev/null @@ -1,1375 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/catalog_pb" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - module Rest - ## - # REST service stub for the CatalogService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the create_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_entry_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_entry_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_entry_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_entry_types REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] - # A result object deserialized from the server's reply - def list_entry_types request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_entry_types_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # A result object deserialized from the server's reply - def get_entry_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::EntryType.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_aspect_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_aspect_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_aspect_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_aspect_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_aspect_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_aspect_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_aspect_types REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] - # A result object deserialized from the server's reply - def list_aspect_types request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_aspect_types_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::AspectType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # A result object deserialized from the server's reply - def get_aspect_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_aspect_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::AspectType.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_entry_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_entry_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_entry_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_entry_groups REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] - # A result object deserialized from the server's reply - def list_entry_groups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_entry_groups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # A result object deserialized from the server's reply - def get_entry_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::EntryGroup.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def create_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def update_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def delete_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_entries REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntriesResponse] - # A result object deserialized from the server's reply - def list_entries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_entries_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def get_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the lookup_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::LookupEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def lookup_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_lookup_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the search_entries REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::SearchEntriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] - # A result object deserialized from the server's reply - def search_entries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_entries_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the create_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_entry_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/entryTypes", - body: "entry_type", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_entry_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{entry_type.name}", - body: "entry_type", - matches: [ - ["entry_type.name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_entry_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_entry_types REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_entry_types_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/entryTypes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_entry_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_aspect_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/aspectTypes", - body: "aspect_type", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_aspect_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{aspect_type.name}", - body: "aspect_type", - matches: [ - ["aspect_type.name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_aspect_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_aspect_types REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_aspect_types_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/aspectTypes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_aspect_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_entry_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/entryGroups", - body: "entry_group", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_entry_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{entry_group.name}", - body: "entry_group", - matches: [ - ["entry_group.name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_entry_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_entry_groups REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_entry_groups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/entryGroups", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_entry_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/entries", - body: "entry", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{entry.name}", - body: "entry", - matches: [ - ["entry.name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_entries REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_entries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/entries", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the lookup_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::LookupEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_lookup_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:lookupEntry", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_entries REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::SearchEntriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_search_entries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:searchEntries", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb deleted file mode 100644 index 9a6d7d621caf..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb +++ /dev/null @@ -1,91 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/catalog.proto for package 'Google.Cloud.Dataplex.V1' -# Original file comments: -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# - -require 'grpc' -require 'google/cloud/dataplex/v1/catalog_pb' - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - # 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. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.CatalogService' - - # Creates an EntryType - rpc :CreateEntryType, ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Google::Longrunning::Operation - # Updates a EntryType resource. - rpc :UpdateEntryType, ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Google::Longrunning::Operation - # Deletes a EntryType resource. - rpc :DeleteEntryType, ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Google::Longrunning::Operation - # Lists EntryType resources in a project and location. - rpc :ListEntryTypes, ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse - # Retrieves a EntryType resource. - rpc :GetEntryType, ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Google::Cloud::Dataplex::V1::EntryType - # Creates an AspectType - rpc :CreateAspectType, ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Google::Longrunning::Operation - # Updates a AspectType resource. - rpc :UpdateAspectType, ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Google::Longrunning::Operation - # Deletes a AspectType resource. - rpc :DeleteAspectType, ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Google::Longrunning::Operation - # Lists AspectType resources in a project and location. - rpc :ListAspectTypes, ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse - # Retrieves a AspectType resource. - rpc :GetAspectType, ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Google::Cloud::Dataplex::V1::AspectType - # Creates an EntryGroup - rpc :CreateEntryGroup, ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Google::Longrunning::Operation - # Updates a EntryGroup resource. - rpc :UpdateEntryGroup, ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Google::Longrunning::Operation - # Deletes a EntryGroup resource. - rpc :DeleteEntryGroup, ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Google::Longrunning::Operation - # Lists EntryGroup resources in a project and location. - rpc :ListEntryGroups, ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse - # Retrieves a EntryGroup resource. - rpc :GetEntryGroup, ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Google::Cloud::Dataplex::V1::EntryGroup - # Creates an Entry. - rpc :CreateEntry, ::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Google::Cloud::Dataplex::V1::Entry - # Updates an Entry. - rpc :UpdateEntry, ::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Google::Cloud::Dataplex::V1::Entry - # Deletes an Entry. - rpc :DeleteEntry, ::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Google::Cloud::Dataplex::V1::Entry - # Lists entries within an entry group. - rpc :ListEntries, ::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Google::Cloud::Dataplex::V1::ListEntriesResponse - # Gets a single entry. - rpc :GetEntry, ::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Google::Cloud::Dataplex::V1::Entry - # Looks up a single entry. - rpc :LookupEntry, ::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Google::Cloud::Dataplex::V1::Entry - # Searches for entries matching given query and scope. - rpc :SearchEntries, ::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Google::Cloud::Dataplex::V1::SearchEntriesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb deleted file mode 100644 index 972edf974184..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/content.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/analyze_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n&google/cloud/dataplex/v1/content.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/analyze.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa1\x01\n\x14\x43reateContentRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x37\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.google.cloud.dataplex.v1.ContentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xa1\x01\n\x14UpdateContentRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x37\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.google.cloud.dataplex.v1.ContentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"M\n\x14\x44\x65leteContentRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Content\"\x90\x01\n\x12ListContentRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"b\n\x13ListContentResponse\x12\x32\n\x07\x63ontent\x18\x01 \x03(\x0b\x32!.google.cloud.dataplex.v1.Content\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd8\x01\n\x11GetContentRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Content\x12J\n\x04view\x18\x02 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.GetContentRequest.ContentViewB\x03\xe0\x41\x01\"@\n\x0b\x43ontentView\x12\x1c\n\x18\x43ONTENT_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x32\xad\x10\n\x0e\x43ontentService\x12\x80\x02\n\rCreateContent\x12..google.cloud.dataplex.v1.CreateContentRequest\x1a!.google.cloud.dataplex.v1.Content\"\x9b\x01\xda\x41\x0eparent,content\x82\xd3\xe4\x93\x02\x83\x01\"8/v1/{parent=projects/*/locations/*/lakes/*}/contentitems:\x07\x63ontentZ>\"3/v1/{parent=projects/*/locations/*/lakes/*}/content:\x07\x63ontent\x12\x97\x02\n\rUpdateContent\x12..google.cloud.dataplex.v1.UpdateContentRequest\x1a!.google.cloud.dataplex.v1.Content\"\xb2\x01\xda\x41\x13\x63ontent,update_mask\x82\xd3\xe4\x93\x02\x95\x01\x32\x41/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}:\x07\x63ontentZG2 e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a content. Only supports full resource update. - # - # @overload update_content(request, options = nil) - # Pass arguments to `update_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_content(update_mask: nil, content: nil, validate_only: nil) - # Pass arguments to `update_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new - # - # # Call the update_content method. - # result = client.update_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def update_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.content&.name - header_params["content.name"] = request.content.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :update_content, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a content. - # - # @overload delete_content(request, options = nil) - # Pass arguments to `delete_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_content(name: nil) - # Pass arguments to `delete_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new - # - # # Call the delete_content method. - # result = client.delete_content request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :delete_content, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a content resource. - # - # @overload get_content(request, options = nil) - # Pass arguments to `get_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_content(name: nil, view: nil) - # Pass arguments to `get_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # @param view [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView] - # Optional. Specify content view to make a partial request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetContentRequest.new - # - # # Call the get_content method. - # result = client.get_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def get_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :get_content, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List content. - # - # @overload list_content(request, options = nil) - # Pass arguments to `list_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_content(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListContentRequest.new - # - # # Call the list_content method. - # result = client.list_content request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Content. - # p item - # end - # - def list_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :list_content, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @content_service_stub, :list_content, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ContentService API. - # - # This class represents the configuration for ContentService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_content to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::ContentService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ContentService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_content` - # @return [::Gapic::Config::Method] - # - attr_reader :create_content - ## - # RPC-specific configuration for `update_content` - # @return [::Gapic::Config::Method] - # - attr_reader :update_content - ## - # RPC-specific configuration for `delete_content` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_content - ## - # RPC-specific configuration for `get_content` - # @return [::Gapic::Config::Method] - # - attr_reader :get_content - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `list_content` - # @return [::Gapic::Config::Method] - # - attr_reader :list_content - - # @private - def initialize parent_rpcs = nil - create_content_config = parent_rpcs.create_content if parent_rpcs.respond_to? :create_content - @create_content = ::Gapic::Config::Method.new create_content_config - update_content_config = parent_rpcs.update_content if parent_rpcs.respond_to? :update_content - @update_content = ::Gapic::Config::Method.new update_content_config - delete_content_config = parent_rpcs.delete_content if parent_rpcs.respond_to? :delete_content - @delete_content = ::Gapic::Config::Method.new delete_content_config - get_content_config = parent_rpcs.get_content if parent_rpcs.respond_to? :get_content - @get_content = ::Gapic::Config::Method.new get_content_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - list_content_config = parent_rpcs.list_content if parent_rpcs.respond_to? :list_content - @list_content = ::Gapic::Config::Method.new list_content_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb deleted file mode 100644 index 19e1ffcd0c88..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module ContentService - # Credentials for the ContentService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb deleted file mode 100644 index 57ef53d237e3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - module ContentService - # Path helper methods for the ContentService API. - module Paths - ## - # Create a fully-qualified Content resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/content/{content}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param content [String] - # - # @return [::String] - def content_path project:, location:, lake:, content: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/content/#{content}" - end - - ## - # Create a fully-qualified Lake resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # - # @return [::String] - def lake_path project:, location:, lake: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb deleted file mode 100644 index 42bc1424d9a6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/content_service/credentials" -require "google/cloud/dataplex/v1/content_service/paths" -require "google/cloud/dataplex/v1/content_service/rest/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # ContentService manages Notebook and SQL Scripts for Dataplex. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/content_service/rest" - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - module ContentService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/content_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb deleted file mode 100644 index d02359ca50f4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +++ /dev/null @@ -1,1131 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/content_pb" -require "google/cloud/dataplex/v1/content_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module ContentService - module Rest - ## - # REST client for the ContentService service. - # - # ContentService manages Notebook and SQL Scripts for Dataplex. - # - class Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :content_service_stub - - ## - # Configure the ContentService Client class. - # - # See {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ContentService clients - # ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_content.timeout = 60.0 - - default_config.rpcs.update_content.timeout = 60.0 - - default_config.rpcs.delete_content.timeout = 60.0 - - default_config.rpcs.get_content.timeout = 60.0 - default_config.rpcs.get_content.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_iam_policy.timeout = 60.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_content.timeout = 60.0 - default_config.rpcs.list_content.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ContentService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @content_service_stub.universe_domain - end - - ## - # Create a new ContentService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ContentService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @content_service_stub = ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @content_service_stub.endpoint - config.universe_domain = @content_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @content_service_stub.endpoint - config.universe_domain = @content_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Create a content. - # - # @overload create_content(request, options = nil) - # Pass arguments to `create_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_content(parent: nil, content: nil, validate_only: nil) - # Pass arguments to `create_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} - # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] - # Required. Content resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateContentRequest.new - # - # # Call the create_content method. - # result = client.create_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def create_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.create_content request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a content. Only supports full resource update. - # - # @overload update_content(request, options = nil) - # Pass arguments to `update_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_content(update_mask: nil, content: nil, validate_only: nil) - # Pass arguments to `update_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new - # - # # Call the update_content method. - # result = client.update_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def update_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.update_content request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a content. - # - # @overload delete_content(request, options = nil) - # Pass arguments to `delete_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_content(name: nil) - # Pass arguments to `delete_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new - # - # # Call the delete_content method. - # result = client.delete_content request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.delete_content request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a content resource. - # - # @overload get_content(request, options = nil) - # Pass arguments to `get_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_content(name: nil, view: nil) - # Pass arguments to `get_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # @param view [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView] - # Optional. Specify content view to make a partial request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetContentRequest.new - # - # # Call the get_content method. - # result = client.get_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def get_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.get_content request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List content. - # - # @overload list_content(request, options = nil) - # Pass arguments to `list_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_content(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListContentRequest.new - # - # # Call the list_content method. - # result = client.list_content request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Content. - # p item - # end - # - def list_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.list_content request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @content_service_stub, :list_content, "content", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ContentService REST API. - # - # This class represents the configuration for ContentService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_content to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ContentService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_content` - # @return [::Gapic::Config::Method] - # - attr_reader :create_content - ## - # RPC-specific configuration for `update_content` - # @return [::Gapic::Config::Method] - # - attr_reader :update_content - ## - # RPC-specific configuration for `delete_content` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_content - ## - # RPC-specific configuration for `get_content` - # @return [::Gapic::Config::Method] - # - attr_reader :get_content - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `list_content` - # @return [::Gapic::Config::Method] - # - attr_reader :list_content - - # @private - def initialize parent_rpcs = nil - create_content_config = parent_rpcs.create_content if parent_rpcs.respond_to? :create_content - @create_content = ::Gapic::Config::Method.new create_content_config - update_content_config = parent_rpcs.update_content if parent_rpcs.respond_to? :update_content - @update_content = ::Gapic::Config::Method.new update_content_config - delete_content_config = parent_rpcs.delete_content if parent_rpcs.respond_to? :delete_content - @delete_content = ::Gapic::Config::Method.new delete_content_config - get_content_config = parent_rpcs.get_content if parent_rpcs.respond_to? :get_content - @get_content = ::Gapic::Config::Method.new get_content_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - list_content_config = parent_rpcs.list_content if parent_rpcs.respond_to? :list_content - @list_content = ::Gapic::Config::Method.new list_content_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb deleted file mode 100644 index 4ea2e6fdf50e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb +++ /dev/null @@ -1,605 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/content_pb" - -module Google - module Cloud - module Dataplex - module V1 - module ContentService - module Rest - ## - # REST service stub for the ContentService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the create_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # A result object deserialized from the server's reply - def create_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # A result object deserialized from the server's reply - def update_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # A result object deserialized from the server's reply - def get_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListContentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListContentResponse] - # A result object deserialized from the server's reply - def list_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListContentResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the create_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/contentitems", - body: "content", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/content", - body: "content", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{content.name}", - body: "content", - matches: [ - ["content.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{content.name}", - body: "content", - matches: [ - ["content.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/contentitems", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/content", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb deleted file mode 100644 index e2f3c9f33182..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb +++ /dev/null @@ -1,77 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/content.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# - -require 'grpc' -require 'google/cloud/dataplex/v1/content_pb' - -module Google - module Cloud - module Dataplex - module V1 - module ContentService - # ContentService manages Notebook and SQL Scripts for Dataplex. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.ContentService' - - # Create a content. - rpc :CreateContent, ::Google::Cloud::Dataplex::V1::CreateContentRequest, ::Google::Cloud::Dataplex::V1::Content - # Update a content. Only supports full resource update. - rpc :UpdateContent, ::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Google::Cloud::Dataplex::V1::Content - # Delete a content. - rpc :DeleteContent, ::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Google::Protobuf::Empty - # Get a content resource. - rpc :GetContent, ::Google::Cloud::Dataplex::V1::GetContentRequest, ::Google::Cloud::Dataplex::V1::Content - # 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, ::Google::Iam::V1::Policy - # 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, ::Google::Iam::V1::Policy - # 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, ::Google::Iam::V1::TestIamPermissionsResponse - # List content. - rpc :ListContent, ::Google::Cloud::Dataplex::V1::ListContentRequest, ::Google::Cloud::Dataplex::V1::ListContentResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb deleted file mode 100644 index 81faee451353..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/data_profile.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/dataplex/v1/processing_pb' - - -descriptor_data = "\n+google/cloud/dataplex/v1/data_profile.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a)google/cloud/dataplex/v1/processing.proto\"\xa8\x04\n\x0f\x44\x61taProfileSpec\x12\x1d\n\x10sampling_percent\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x12\x17\n\nrow_filter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12Y\n\x11post_scan_actions\x18\x04 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataProfileSpec.PostScanActionsB\x03\xe0\x41\x01\x12U\n\x0einclude_fields\x18\x05 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsB\x03\xe0\x41\x01\x12U\n\x0e\x65xclude_fields\x18\x06 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsB\x03\xe0\x41\x01\x1a\xa7\x01\n\x0fPostScanActions\x12\x66\n\x0f\x62igquery_export\x18\x01 \x01(\x0b\x32H.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExportB\x03\xe0\x41\x01\x1a,\n\x0e\x42igQueryExport\x12\x1a\n\rresults_table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a*\n\x0eSelectedFields\x12\x18\n\x0b\x66ield_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\xe4\r\n\x11\x44\x61taProfileResult\x12\x11\n\trow_count\x18\x03 \x01(\x03\x12\x44\n\x07profile\x18\x04 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.DataProfileResult.Profile\x12;\n\x0cscanned_data\x18\x05 \x01(\x0b\x32%.google.cloud.dataplex.v1.ScannedData\x12h\n\x18post_scan_actions_result\x18\x06 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResultB\x03\xe0\x41\x03\x1a\xce\x08\n\x07Profile\x12I\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x39.google.cloud.dataplex.v1.DataProfileResult.Profile.Field\x1a\xf7\x07\n\x05\x46ield\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0c\n\x04mode\x18\x03 \x01(\t\x12V\n\x07profile\x18\x04 \x01(\x0b\x32\x45.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo\x1a\xeb\x06\n\x0bProfileInfo\x12\x12\n\nnull_ratio\x18\x02 \x01(\x01\x12\x16\n\x0e\x64istinct_ratio\x18\x03 \x01(\x01\x12\x65\n\x0ctop_n_values\x18\x04 \x03(\x0b\x32O.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue\x12o\n\x0estring_profile\x18\x65 \x01(\x0b\x32U.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfoH\x00\x12q\n\x0finteger_profile\x18\x66 \x01(\x0b\x32V.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfoH\x00\x12o\n\x0e\x64ouble_profile\x18g \x01(\x0b\x32U.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfoH\x00\x1aQ\n\x0fStringFieldInfo\x12\x12\n\nmin_length\x18\x01 \x01(\x03\x12\x12\n\nmax_length\x18\x02 \x01(\x03\x12\x16\n\x0e\x61verage_length\x18\x03 \x01(\x01\x1al\n\x10IntegerFieldInfo\x12\x0f\n\x07\x61verage\x18\x01 \x01(\x01\x12\x1a\n\x12standard_deviation\x18\x03 \x01(\x01\x12\x0b\n\x03min\x18\x04 \x01(\x03\x12\x11\n\tquartiles\x18\x06 \x03(\x03\x12\x0b\n\x03max\x18\x05 \x01(\x03\x1ak\n\x0f\x44oubleFieldInfo\x12\x0f\n\x07\x61verage\x18\x01 \x01(\x01\x12\x1a\n\x12standard_deviation\x18\x03 \x01(\x01\x12\x0b\n\x03min\x18\x04 \x01(\x01\x12\x11\n\tquartiles\x18\x06 \x03(\x01\x12\x0b\n\x03max\x18\x05 \x01(\x01\x1a\x38\n\tTopNValue\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x12\r\n\x05ratio\x18\x03 \x01(\x01\x42\x0c\n\nfield_info\x1a\xfd\x02\n\x15PostScanActionsResult\x12{\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32V.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResultB\x03\xe0\x41\x03\x1a\xe6\x01\n\x14\x42igQueryExportResult\x12p\n\x05state\x18\x01 \x01(\x0e\x32\\.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.StateB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\x42l\n\x1c\x63om.google.cloud.dataplex.v1B\x10\x44\x61taProfileProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.dataplex.v1.ScannedData", "google/cloud/dataplex/v1/processing.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - DataProfileSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec").msgclass - DataProfileSpec::PostScanActions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.PostScanActions").msgclass - DataProfileSpec::PostScanActions::BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport").msgclass - DataProfileSpec::SelectedFields = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.SelectedFields").msgclass - DataProfileResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult").msgclass - DataProfileResult::Profile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile").msgclass - DataProfileResult::Profile::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field").msgclass - DataProfileResult::Profile::Field::ProfileInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo").msgclass - DataProfileResult::Profile::Field::ProfileInfo::StringFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo").msgclass - DataProfileResult::Profile::Field::ProfileInfo::IntegerFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo").msgclass - DataProfileResult::Profile::Field::ProfileInfo::DoubleFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo").msgclass - DataProfileResult::Profile::Field::ProfileInfo::TopNValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue").msgclass - DataProfileResult::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult").msgclass - DataProfileResult::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult").msgclass - DataProfileResult::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb deleted file mode 100644 index 57d9d4786491..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/data_quality.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/processing_pb' - - -descriptor_data = "\n+google/cloud/dataplex/v1/data_quality.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/dataplex/v1/processing.proto\"\xc0\x08\n\x0f\x44\x61taQualitySpec\x12=\n\x05rules\x18\x01 \x03(\x0b\x32).google.cloud.dataplex.v1.DataQualityRuleB\x03\xe0\x41\x02\x12\x1d\n\x10sampling_percent\x18\x04 \x01(\x02\x42\x03\xe0\x41\x01\x12\x17\n\nrow_filter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12Y\n\x11post_scan_actions\x18\x06 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataQualitySpec.PostScanActionsB\x03\xe0\x41\x01\x1a\xda\x06\n\x0fPostScanActions\x12\x66\n\x0f\x62igquery_export\x18\x01 \x01(\x0b\x32H.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExportB\x03\xe0\x41\x01\x12n\n\x13notification_report\x18\x02 \x01(\x0b\x32L.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReportB\x03\xe0\x41\x01\x1a,\n\x0e\x42igQueryExport\x12\x1a\n\rresults_table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a!\n\nRecipients\x12\x13\n\x06\x65mails\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a\x35\n\x15ScoreThresholdTrigger\x12\x1c\n\x0fscore_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x1a\x13\n\x11JobFailureTrigger\x1a\x0f\n\rJobEndTrigger\x1a\xc0\x03\n\x12NotificationReport\x12]\n\nrecipients\x18\x01 \x01(\x0b\x32\x44.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.RecipientsB\x03\xe0\x41\x02\x12u\n\x17score_threshold_trigger\x18\x02 \x01(\x0b\x32O.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTriggerB\x03\xe0\x41\x01\x12m\n\x13job_failure_trigger\x18\x04 \x01(\x0b\x32K.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTriggerB\x03\xe0\x41\x01\x12\x65\n\x0fjob_end_trigger\x18\x05 \x01(\x0b\x32G.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTriggerB\x03\xe0\x41\x01\"\xd3\x06\n\x11\x44\x61taQualityResult\x12\x0e\n\x06passed\x18\x05 \x01(\x08\x12\x17\n\x05score\x18\t \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12H\n\ndimensions\x18\x02 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.DataQualityDimensionResult\x12G\n\x07\x63olumns\x18\n \x03(\x0b\x32\x31.google.cloud.dataplex.v1.DataQualityColumnResultB\x03\xe0\x41\x03\x12>\n\x05rules\x18\x03 \x03(\x0b\x32/.google.cloud.dataplex.v1.DataQualityRuleResult\x12\x11\n\trow_count\x18\x04 \x01(\x03\x12;\n\x0cscanned_data\x18\x07 \x01(\x0b\x32%.google.cloud.dataplex.v1.ScannedData\x12h\n\x18post_scan_actions_result\x18\x08 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultB\x03\xe0\x41\x03\x1a\xfd\x02\n\x15PostScanActionsResult\x12{\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32V.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResultB\x03\xe0\x41\x03\x1a\xe6\x01\n\x14\x42igQueryExportResult\x12p\n\x05state\x18\x01 \x01(\x0e\x32\\.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.StateB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\x42\x08\n\x06_score\"\xf5\x01\n\x15\x44\x61taQualityRuleResult\x12\x37\n\x04rule\x18\x01 \x01(\x0b\x32).google.cloud.dataplex.v1.DataQualityRule\x12\x0e\n\x06passed\x18\x07 \x01(\x08\x12\x17\n\x0f\x65valuated_count\x18\t \x01(\x03\x12\x14\n\x0cpassed_count\x18\x08 \x01(\x03\x12\x12\n\nnull_count\x18\x05 \x01(\x03\x12\x12\n\npass_ratio\x18\x06 \x01(\x01\x12\x1a\n\x12\x66\x61iling_rows_query\x18\n \x01(\t\x12 \n\x13\x61ssertion_row_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\"\x97\x01\n\x1a\x44\x61taQualityDimensionResult\x12\x46\n\tdimension\x18\x01 \x01(\x0b\x32..google.cloud.dataplex.v1.DataQualityDimensionB\x03\xe0\x41\x03\x12\x0e\n\x06passed\x18\x03 \x01(\x08\x12\x17\n\x05score\x18\x04 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x08\n\x06_score\"$\n\x14\x44\x61taQualityDimension\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xf4\r\n\x0f\x44\x61taQualityRule\x12W\n\x11range_expectation\x18\x01 \x01(\x0b\x32:.google.cloud.dataplex.v1.DataQualityRule.RangeExpectationH\x00\x12\\\n\x14non_null_expectation\x18\x02 \x01(\x0b\x32<.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectationH\x00\x12S\n\x0fset_expectation\x18\x03 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataQualityRule.SetExpectationH\x00\x12W\n\x11regex_expectation\x18\x04 \x01(\x0b\x32:.google.cloud.dataplex.v1.DataQualityRule.RegexExpectationH\x00\x12\x61\n\x16uniqueness_expectation\x18\x64 \x01(\x0b\x32?.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectationH\x00\x12j\n\x1bstatistic_range_expectation\x18\x65 \x01(\x0b\x32\x43.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectationH\x00\x12g\n\x19row_condition_expectation\x18\xc8\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectationH\x00\x12k\n\x1btable_condition_expectation\x18\xc9\x01 \x01(\x0b\x32\x43.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectationH\x00\x12P\n\rsql_assertion\x18\xca\x01 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DataQualityRule.SqlAssertionH\x00\x12\x14\n\x06\x63olumn\x18\xf4\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0bignore_null\x18\xf5\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x17\n\tdimension\x18\xf6\x03 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\tthreshold\x18\xf7\x03 \x01(\x01\x42\x03\xe0\x41\x01\x12\x12\n\x04name\x18\xf8\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0b\x64\x65scription\x18\xf9\x03 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x01\n\x10RangeExpectation\x12\x16\n\tmin_value\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tmax_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12strict_min_enabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12strict_max_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x14\n\x12NonNullExpectation\x1a%\n\x0eSetExpectation\x12\x13\n\x06values\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a&\n\x10RegexExpectation\x12\x12\n\x05regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x17\n\x15UniquenessExpectation\x1a\xc2\x02\n\x19StatisticRangeExpectation\x12k\n\tstatistic\x18\x01 \x01(\x0e\x32S.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatisticB\x03\xe0\x41\x01\x12\x16\n\tmin_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tmax_value\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12strict_min_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12strict_max_enabled\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"F\n\x0f\x43olumnStatistic\x12\x17\n\x13STATISTIC_UNDEFINED\x10\x00\x12\x08\n\x04MEAN\x10\x01\x12\x07\n\x03MIN\x10\x02\x12\x07\n\x03MAX\x10\x03\x1a\x36\n\x17RowConditionExpectation\x12\x1b\n\x0esql_expression\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x38\n\x19TableConditionExpectation\x12\x1b\n\x0esql_expression\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a*\n\x0cSqlAssertion\x12\x1a\n\rsql_statement\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x0b\n\trule_type\"Q\n\x17\x44\x61taQualityColumnResult\x12\x13\n\x06\x63olumn\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\x05score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x08\n\x06_scoreB\xc4\x01\n\x1c\x63om.google.cloud.dataplex.v1B\x10\x44\x61taQualityProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.dataplex.v1.ScannedData", "google/cloud/dataplex/v1/processing.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - DataQualitySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec").msgclass - DataQualitySpec::PostScanActions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions").msgclass - DataQualitySpec::PostScanActions::BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport").msgclass - DataQualitySpec::PostScanActions::Recipients = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients").msgclass - DataQualitySpec::PostScanActions::ScoreThresholdTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger").msgclass - DataQualitySpec::PostScanActions::JobFailureTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger").msgclass - DataQualitySpec::PostScanActions::JobEndTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger").msgclass - DataQualitySpec::PostScanActions::NotificationReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport").msgclass - DataQualityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult").msgclass - DataQualityResult::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult").msgclass - DataQualityResult::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult").msgclass - DataQualityResult::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State").enummodule - DataQualityRuleResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRuleResult").msgclass - DataQualityDimensionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityDimensionResult").msgclass - DataQualityDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityDimension").msgclass - DataQualityRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule").msgclass - DataQualityRule::RangeExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RangeExpectation").msgclass - DataQualityRule::NonNullExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation").msgclass - DataQualityRule::SetExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.SetExpectation").msgclass - DataQualityRule::RegexExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RegexExpectation").msgclass - DataQualityRule::UniquenessExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation").msgclass - DataQualityRule::StatisticRangeExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation").msgclass - DataQualityRule::StatisticRangeExpectation::ColumnStatistic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic").enummodule - DataQualityRule::RowConditionExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation").msgclass - DataQualityRule::TableConditionExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation").msgclass - DataQualityRule::SqlAssertion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.SqlAssertion").msgclass - DataQualityColumnResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityColumnResult").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb deleted file mode 100644 index 9563fe840d55..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" - -require "google/cloud/dataplex/v1/data_scan_service/credentials" -require "google/cloud/dataplex/v1/data_scan_service/paths" -require "google/cloud/dataplex/v1/data_scan_service/operations" -require "google/cloud/dataplex/v1/data_scan_service/client" -require "google/cloud/dataplex/v1/data_scan_service/rest" - -module Google - module Cloud - module Dataplex - module 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. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1/data_scan_service" - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/dataplex/v1/data_scan_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - module DataScanService - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_scan_service", "helpers.rb" -require "google/cloud/dataplex/v1/data_scan_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb deleted file mode 100644 index eceda72aff4a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +++ /dev/null @@ -1,1329 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/datascans_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - ## - # Client for the DataScanService service. - # - # 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 Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_scan_service_stub - - ## - # Configure the DataScanService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataScanService clients - # ::Google::Cloud::Dataplex::V1::DataScanService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataScanService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_scan_service_stub.universe_domain - end - - ## - # Create a new DataScanService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataScanService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/dataplex/v1/datascans_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @data_scan_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dataplex::V1::DataScanService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_scan_service_stub.endpoint - config.universe_domain = @data_scan_service_stub.universe_domain - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_scan_service_stub.endpoint - config.universe_domain = @data_scan_service_stub.universe_domain - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataScanService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Creates a DataScan resource. - # - # @overload create_data_scan(request, options = nil) - # Pass arguments to `create_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_scan(parent: nil, data_scan: nil, data_scan_id: nil, validate_only: nil) - # Pass arguments to `create_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] - # Required. DataScan resource. - # @param data_scan_id [::String] - # 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 validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new - # - # # Call the create_data_scan method. - # result = client.create_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_data_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :create_data_scan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataScan resource. - # - # @overload update_data_scan(request, options = nil) - # Pass arguments to `update_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_scan(data_scan: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] - # Required. DataScan resource to be updated. - # - # Only fields specified in `update_mask` are updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new - # - # # Call the update_data_scan method. - # result = client.update_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_scan&.name - header_params["data_scan.name"] = request.data_scan.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :update_data_scan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataScan resource. - # - # @overload delete_data_scan(request, options = nil) - # Pass arguments to `delete_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_scan(name: nil) - # Pass arguments to `delete_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new - # - # # Call the delete_data_scan method. - # result = client.delete_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_data_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :delete_data_scan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a DataScan resource. - # - # @overload get_data_scan(request, options = nil) - # Pass arguments to `get_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_scan(name: nil, view: nil) - # Pass arguments to `get_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] - # Optional. Select the DataScan view to return. Defaults to `BASIC`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataScan] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new - # - # # Call the get_data_scan method. - # result = client.get_data_scan request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. - # p result - # - def get_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :get_data_scan, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataScans. - # - # @overload list_data_scans(request, options = nil) - # Pass arguments to `list_data_scans` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataScansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_scans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_scans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new - # - # # Call the list_data_scans method. - # result = client.list_data_scans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. - # p item - # end - # - def list_data_scans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScansRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_scans.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_scans.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_scans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :list_data_scans, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scans, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Runs an on-demand execution of a DataScan - # - # @overload run_data_scan(request, options = nil) - # Pass arguments to `run_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::RunDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_data_scan(name: nil) - # Pass arguments to `run_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new - # - # # Call the run_data_scan method. - # result = client.run_data_scan request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. - # p result - # - def run_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_data_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :run_data_scan, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a DataScanJob resource. - # - # @overload get_data_scan_job(request, options = nil) - # Pass arguments to `get_data_scan_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataScanJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_scan_job(name: nil, view: nil) - # Pass arguments to `get_data_scan_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] - # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataScanJob] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScanJob] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new - # - # # Call the get_data_scan_job method. - # result = client.get_data_scan_job request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. - # p result - # - def get_data_scan_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_scan_job.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_scan_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_scan_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :get_data_scan_job, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataScanJobs under the given DataScan. - # - # @overload list_data_scan_jobs(request, options = nil) - # Pass arguments to `list_data_scan_jobs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_scan_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_scan_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new - # - # # Call the list_data_scan_jobs method. - # result = client.list_data_scan_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. - # p item - # end - # - def list_data_scan_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_scan_jobs.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_scan_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_scan_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :list_data_scan_jobs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Generates recommended DataQualityRule from a data profiling DataScan. - # - # @overload generate_data_quality_rules(request, options = nil) - # Pass arguments to `generate_data_quality_rules` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload generate_data_quality_rules(name: nil) - # Pass arguments to `generate_data_quality_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name should be either - # * the name of a datascan with at least one successful completed data - # profiling job, or - # * the name of a successful completed data profiling datascan job. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new - # - # # Call the generate_data_quality_rules method. - # result = client.generate_data_quality_rules request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. - # p result - # - def generate_data_quality_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.generate_data_quality_rules.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.generate_data_quality_rules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_data_quality_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :generate_data_quality_rules, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataScanService API. - # - # This class represents the configuration for DataScanService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_data_scan to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataScanService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_scan.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_scan.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DataScanService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_scan - ## - # RPC-specific configuration for `update_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_scan - ## - # RPC-specific configuration for `delete_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_scan - ## - # RPC-specific configuration for `get_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_scan - ## - # RPC-specific configuration for `list_data_scans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_scans - ## - # RPC-specific configuration for `run_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :run_data_scan - ## - # RPC-specific configuration for `get_data_scan_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_scan_job - ## - # RPC-specific configuration for `list_data_scan_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_scan_jobs - ## - # RPC-specific configuration for `generate_data_quality_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_data_quality_rules - - # @private - def initialize parent_rpcs = nil - create_data_scan_config = parent_rpcs.create_data_scan if parent_rpcs.respond_to? :create_data_scan - @create_data_scan = ::Gapic::Config::Method.new create_data_scan_config - update_data_scan_config = parent_rpcs.update_data_scan if parent_rpcs.respond_to? :update_data_scan - @update_data_scan = ::Gapic::Config::Method.new update_data_scan_config - delete_data_scan_config = parent_rpcs.delete_data_scan if parent_rpcs.respond_to? :delete_data_scan - @delete_data_scan = ::Gapic::Config::Method.new delete_data_scan_config - get_data_scan_config = parent_rpcs.get_data_scan if parent_rpcs.respond_to? :get_data_scan - @get_data_scan = ::Gapic::Config::Method.new get_data_scan_config - list_data_scans_config = parent_rpcs.list_data_scans if parent_rpcs.respond_to? :list_data_scans - @list_data_scans = ::Gapic::Config::Method.new list_data_scans_config - run_data_scan_config = parent_rpcs.run_data_scan if parent_rpcs.respond_to? :run_data_scan - @run_data_scan = ::Gapic::Config::Method.new run_data_scan_config - get_data_scan_job_config = parent_rpcs.get_data_scan_job if parent_rpcs.respond_to? :get_data_scan_job - @get_data_scan_job = ::Gapic::Config::Method.new get_data_scan_job_config - list_data_scan_jobs_config = parent_rpcs.list_data_scan_jobs if parent_rpcs.respond_to? :list_data_scan_jobs - @list_data_scan_jobs = ::Gapic::Config::Method.new list_data_scan_jobs_config - generate_data_quality_rules_config = parent_rpcs.generate_data_quality_rules if parent_rpcs.respond_to? :generate_data_quality_rules - @generate_data_quality_rules = ::Gapic::Config::Method.new generate_data_quality_rules_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb deleted file mode 100644 index 51307cec4524..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - # Credentials for the DataScanService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb deleted file mode 100644 index 6d49b74e9b13..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb +++ /dev/null @@ -1,801 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DataScanService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataScanService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb deleted file mode 100644 index 1ba91d70b8d2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb +++ /dev/null @@ -1,113 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - # Path helper methods for the DataScanService API. - module Paths - ## - # Create a fully-qualified DataScan resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataScans/{dataScan}` - # - # @param project [String] - # @param location [String] - # @param dataScan [String] - # - # @return [::String] - def data_scan_path project:, location:, dataScan: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataScans/#{dataScan}" - end - - ## - # Create a fully-qualified DataScanJob resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}` - # - # @param project [String] - # @param location [String] - # @param dataScan [String] - # @param job [String] - # - # @return [::String] - def data_scan_job_path project:, location:, dataScan:, job: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataScan cannot contain /" if dataScan.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataScans/#{dataScan}/jobs/#{job}" - end - - ## - # Create a fully-qualified Entity resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # @param entity [String] - # - # @return [::String] - def entity_path project:, location:, lake:, zone:, entity: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb deleted file mode 100644 index bf498ab0f46b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/data_scan_service/credentials" -require "google/cloud/dataplex/v1/data_scan_service/paths" -require "google/cloud/dataplex/v1/data_scan_service/rest/operations" -require "google/cloud/dataplex/v1/data_scan_service/rest/client" - -module Google - module Cloud - module Dataplex - module 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. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/data_scan_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - module DataScanService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/data_scan_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb deleted file mode 100644 index 29318d468576..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +++ /dev/null @@ -1,1248 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/datascans_pb" -require "google/cloud/dataplex/v1/data_scan_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - module Rest - ## - # REST client for the DataScanService service. - # - # 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 Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_scan_service_stub - - ## - # Configure the DataScanService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataScanService clients - # ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataScanService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_scan_service_stub.universe_domain - end - - ## - # Create a new DataScanService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataScanService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @data_scan_service_stub = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_scan_service_stub.endpoint - config.universe_domain = @data_scan_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_scan_service_stub.endpoint - config.universe_domain = @data_scan_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataScanService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Creates a DataScan resource. - # - # @overload create_data_scan(request, options = nil) - # Pass arguments to `create_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_scan(parent: nil, data_scan: nil, data_scan_id: nil, validate_only: nil) - # Pass arguments to `create_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] - # Required. DataScan resource. - # @param data_scan_id [::String] - # 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 validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new - # - # # Call the create_data_scan method. - # result = client.create_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_data_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.create_data_scan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataScan resource. - # - # @overload update_data_scan(request, options = nil) - # Pass arguments to `update_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_scan(data_scan: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] - # Required. DataScan resource to be updated. - # - # Only fields specified in `update_mask` are updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new - # - # # Call the update_data_scan method. - # result = client.update_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.update_data_scan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataScan resource. - # - # @overload delete_data_scan(request, options = nil) - # Pass arguments to `delete_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_scan(name: nil) - # Pass arguments to `delete_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new - # - # # Call the delete_data_scan method. - # result = client.delete_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_data_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.delete_data_scan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a DataScan resource. - # - # @overload get_data_scan(request, options = nil) - # Pass arguments to `get_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_scan(name: nil, view: nil) - # Pass arguments to `get_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] - # Optional. Select the DataScan view to return. Defaults to `BASIC`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new - # - # # Call the get_data_scan method. - # result = client.get_data_scan request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. - # p result - # - def get_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.get_data_scan request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataScans. - # - # @overload list_data_scans(request, options = nil) - # Pass arguments to `list_data_scans` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataScansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_scans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_scans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScansResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataScansResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new - # - # # Call the list_data_scans method. - # result = client.list_data_scans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. - # p item - # end - # - def list_data_scans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScansRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_scans.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_scans.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_scans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.list_data_scans request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Runs an on-demand execution of a DataScan - # - # @overload run_data_scan(request, options = nil) - # Pass arguments to `run_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::RunDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_data_scan(name: nil) - # Pass arguments to `run_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new - # - # # Call the run_data_scan method. - # result = client.run_data_scan request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. - # p result - # - def run_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.run_data_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.run_data_scan request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a DataScanJob resource. - # - # @overload get_data_scan_job(request, options = nil) - # Pass arguments to `get_data_scan_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataScanJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_scan_job(name: nil, view: nil) - # Pass arguments to `get_data_scan_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] - # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScanJob] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScanJob] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new - # - # # Call the get_data_scan_job method. - # result = client.get_data_scan_job request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. - # p result - # - def get_data_scan_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_scan_job.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_scan_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_scan_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.get_data_scan_job request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataScanJobs under the given DataScan. - # - # @overload list_data_scan_jobs(request, options = nil) - # Pass arguments to `list_data_scan_jobs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_scan_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_scan_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new - # - # # Call the list_data_scan_jobs method. - # result = client.list_data_scan_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. - # p item - # end - # - def list_data_scan_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_scan_jobs.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_scan_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_scan_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.list_data_scan_jobs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, "data_scan_jobs", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Generates recommended DataQualityRule from a data profiling DataScan. - # - # @overload generate_data_quality_rules(request, options = nil) - # Pass arguments to `generate_data_quality_rules` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload generate_data_quality_rules(name: nil) - # Pass arguments to `generate_data_quality_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name should be either - # * the name of a datascan with at least one successful completed data - # profiling job, or - # * the name of a successful completed data profiling datascan job. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new - # - # # Call the generate_data_quality_rules method. - # result = client.generate_data_quality_rules request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. - # p result - # - def generate_data_quality_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.generate_data_quality_rules.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.generate_data_quality_rules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_data_quality_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.generate_data_quality_rules request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataScanService REST API. - # - # This class represents the configuration for DataScanService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_data_scan to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_scan.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_scan.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the DataScanService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_scan - ## - # RPC-specific configuration for `update_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_scan - ## - # RPC-specific configuration for `delete_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_scan - ## - # RPC-specific configuration for `get_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_scan - ## - # RPC-specific configuration for `list_data_scans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_scans - ## - # RPC-specific configuration for `run_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :run_data_scan - ## - # RPC-specific configuration for `get_data_scan_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_scan_job - ## - # RPC-specific configuration for `list_data_scan_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_scan_jobs - ## - # RPC-specific configuration for `generate_data_quality_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_data_quality_rules - - # @private - def initialize parent_rpcs = nil - create_data_scan_config = parent_rpcs.create_data_scan if parent_rpcs.respond_to? :create_data_scan - @create_data_scan = ::Gapic::Config::Method.new create_data_scan_config - update_data_scan_config = parent_rpcs.update_data_scan if parent_rpcs.respond_to? :update_data_scan - @update_data_scan = ::Gapic::Config::Method.new update_data_scan_config - delete_data_scan_config = parent_rpcs.delete_data_scan if parent_rpcs.respond_to? :delete_data_scan - @delete_data_scan = ::Gapic::Config::Method.new delete_data_scan_config - get_data_scan_config = parent_rpcs.get_data_scan if parent_rpcs.respond_to? :get_data_scan - @get_data_scan = ::Gapic::Config::Method.new get_data_scan_config - list_data_scans_config = parent_rpcs.list_data_scans if parent_rpcs.respond_to? :list_data_scans - @list_data_scans = ::Gapic::Config::Method.new list_data_scans_config - run_data_scan_config = parent_rpcs.run_data_scan if parent_rpcs.respond_to? :run_data_scan - @run_data_scan = ::Gapic::Config::Method.new run_data_scan_config - get_data_scan_job_config = parent_rpcs.get_data_scan_job if parent_rpcs.respond_to? :get_data_scan_job - @get_data_scan_job = ::Gapic::Config::Method.new get_data_scan_job_config - list_data_scan_jobs_config = parent_rpcs.list_data_scan_jobs if parent_rpcs.respond_to? :list_data_scan_jobs - @list_data_scan_jobs = ::Gapic::Config::Method.new list_data_scan_jobs_config - generate_data_quality_rules_config = parent_rpcs.generate_data_quality_rules if parent_rpcs.respond_to? :generate_data_quality_rules - @generate_data_quality_rules = ::Gapic::Config::Method.new generate_data_quality_rules_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb deleted file mode 100644 index 9c664a2eee4e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb +++ /dev/null @@ -1,895 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DataScanService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataScanService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb deleted file mode 100644 index 2ff5a60c134c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb +++ /dev/null @@ -1,612 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/datascans_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - module Rest - ## - # REST service stub for the DataScanService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the create_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # A result object deserialized from the server's reply - def get_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataScan.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_data_scans REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScansRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScansResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataScansResponse] - # A result object deserialized from the server's reply - def list_data_scans request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_scans_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the run_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::RunDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # A result object deserialized from the server's reply - def run_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_data_scan_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScanJob] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScanJob] - # A result object deserialized from the server's reply - def get_data_scan_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_scan_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataScanJob.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_data_scan_jobs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse] - # A result object deserialized from the server's reply - def list_data_scan_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_scan_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the generate_data_quality_rules REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # A result object deserialized from the server's reply - def generate_data_quality_rules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_data_quality_rules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataScans", - body: "data_scan", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_scan.name}", - body: "data_scan", - matches: [ - ["data_scan.name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_scans REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScansRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_scans_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataScans", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::RunDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:run", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_scan_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_scan_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_scan_jobs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_scan_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/jobs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_data_quality_rules REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_generate_data_quality_rules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:generateDataQualityRules", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:generateDataQualityRules", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb deleted file mode 100644 index 6d32d95fb76b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/data_taxonomy.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/security_pb' -require 'google/cloud/dataplex/v1/service_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/cloud/dataplex/v1/data_taxonomy.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/dataplex/v1/security.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x04\n\x0c\x44\x61taTaxonomy\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12G\n\x06labels\x18\x08 \x03(\x0b\x32\x32.google.cloud.dataplex.v1.DataTaxonomy.LabelsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0f\x61ttribute_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\n \x01(\t\x12\x18\n\x0b\x63lass_count\x18\x0b \x01(\x05\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n$dataplex.googleapis.com/DataTaxonomy\x12Iprojects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}\"\x94\x06\n\rDataAttribute\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12H\n\x06labels\x18\x07 \x03(\x0b\x32\x33.google.cloud.dataplex.v1.DataAttribute.LabelsEntryB\x03\xe0\x41\x01\x12@\n\tparent_id\x18\x08 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12\x1c\n\x0f\x61ttribute_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\n \x01(\t\x12O\n\x14resource_access_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.ResourceAccessSpecB\x03\xe0\x41\x01\x12G\n\x10\x64\x61ta_access_spec\x18\x65 \x01(\x0b\x32(.google.cloud.dataplex.v1.DataAccessSpecB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x91\x01\xea\x41\x8d\x01\n%dataplex.googleapis.com/DataAttribute\x12\x64projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}\"\xc7\x06\n\x14\x44\x61taAttributeBinding\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x03\xfa\x41.\n,dataplex.googleapis.com/DataAttributeBinding\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12O\n\x06labels\x18\x07 \x03(\x0b\x32:.google.cloud.dataplex.v1.DataAttributeBinding.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12\x1a\n\x08resource\x18\x64 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x41\n\nattributes\x18n \x03(\tB-\xe0\x41\x01\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12G\n\x05paths\x18x \x03(\x0b\x32\x33.google.cloud.dataplex.v1.DataAttributeBinding.PathB\x03\xe0\x41\x01\x1a\\\n\x04Path\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\nattributes\x18\x02 \x03(\tB-\xe0\x41\x01\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8d\x01\xea\x41\x89\x01\n,dataplex.googleapis.com/DataAttributeBinding\x12Yprojects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}B\x14\n\x12resource_reference\"\xd5\x01\n\x19\x43reateDataTaxonomyRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1d\n\x10\x64\x61ta_taxonomy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\rdata_taxonomy\x18\x03 \x01(\x0b\x32&.google.cloud.dataplex.v1.DataTaxonomyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n\x19UpdateDataTaxonomyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x42\n\rdata_taxonomy\x18\x02 \x01(\x0b\x32&.google.cloud.dataplex.v1.DataTaxonomyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"T\n\x16GetDataTaxonomyRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\"\xb3\x01\n\x19ListDataTaxonomiesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x95\x01\n\x1aListDataTaxonomiesResponse\x12?\n\x0f\x64\x61ta_taxonomies\x18\x01 \x03(\x0b\x32&.google.cloud.dataplex.v1.DataTaxonomy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"j\n\x19\x44\x65leteDataTaxonomyRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xdc\x01\n\x1a\x43reateDataAttributeRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x1e\n\x11\x64\x61ta_attribute_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x0e\x64\x61ta_attribute\x18\x03 \x01(\x0b\x32\'.google.cloud.dataplex.v1.DataAttributeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xb4\x01\n\x1aUpdateDataAttributeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x44\n\x0e\x64\x61ta_attribute\x18\x02 \x01(\x0b\x32\'.google.cloud.dataplex.v1.DataAttributeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"V\n\x17GetDataAttributeRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\"\xb6\x01\n\x19ListDataAttributesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1aListDataAttributesResponse\x12@\n\x0f\x64\x61ta_attributes\x18\x01 \x03(\x0b\x32\'.google.cloud.dataplex.v1.DataAttribute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"l\n\x1a\x44\x65leteDataAttributeRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xf7\x01\n!CreateDataAttributeBindingRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12&\n\x19\x64\x61ta_attribute_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12S\n\x16\x64\x61ta_attribute_binding\x18\x03 \x01(\x0b\x32..google.cloud.dataplex.v1.DataAttributeBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xca\x01\n!UpdateDataAttributeBindingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12S\n\x16\x64\x61ta_attribute_binding\x18\x02 \x01(\x0b\x32..google.cloud.dataplex.v1.DataAttributeBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"d\n\x1eGetDataAttributeBindingRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,dataplex.googleapis.com/DataAttributeBinding\"\xba\x01\n ListDataAttributeBindingsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n!ListDataAttributeBindingsResponse\x12O\n\x17\x64\x61ta_attribute_bindings\x18\x01 \x03(\x0b\x32..google.cloud.dataplex.v1.DataAttributeBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"z\n!DeleteDataAttributeBindingRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,dataplex.googleapis.com/DataAttributeBinding\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\x32\x8b\x1d\n\x13\x44\x61taTaxonomyService\x12\x80\x02\n\x12\x43reateDataTaxonomy\x12\x33.google.cloud.dataplex.v1.CreateDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41!\n\x0c\x44\x61taTaxonomy\x12\x11OperationMetadata\xda\x41%parent,data_taxonomy,data_taxonomy_id\x82\xd3\xe4\x93\x02\x43\"2/v1/{parent=projects/*/locations/*}/dataTaxonomies:\rdata_taxonomy\x12\x82\x02\n\x12UpdateDataTaxonomy\x12\x33.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"\x97\x01\xca\x41!\n\x0c\x44\x61taTaxonomy\x12\x11OperationMetadata\xda\x41\x19\x64\x61ta_taxonomy,update_mask\x82\xd3\xe4\x93\x02Q2@/v1/{data_taxonomy.name=projects/*/locations/*/dataTaxonomies/*}:\rdata_taxonomy\x12\xd8\x01\n\x12\x44\x65leteDataTaxonomy\x12\x33.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/dataTaxonomies/*}\x12\xc4\x01\n\x12ListDataTaxonomies\x12\x33.google.cloud.dataplex.v1.ListDataTaxonomiesRequest\x1a\x34.google.cloud.dataplex.v1.ListDataTaxonomiesResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/dataTaxonomies\x12\xae\x01\n\x0fGetDataTaxonomy\x12\x30.google.cloud.dataplex.v1.GetDataTaxonomyRequest\x1a&.google.cloud.dataplex.v1.DataTaxonomy\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/dataTaxonomies/*}\x12\xba\x02\n\x1a\x43reateDataAttributeBinding\x12;.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41)\n\x14\x44\x61taAttributeBinding\x12\x11OperationMetadata\xda\x41\x37parent,data_attribute_binding,data_attribute_binding_id\x82\xd3\xe4\x93\x02S\"9/v1/{parent=projects/*/locations/*}/dataAttributeBindings:\x16\x64\x61ta_attribute_binding\x12\xbc\x02\n\x1aUpdateDataAttributeBinding\x12;.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41)\n\x14\x44\x61taAttributeBinding\x12\x11OperationMetadata\xda\x41\"data_attribute_binding,update_mask\x82\xd3\xe4\x93\x02j2P/v1/{data_attribute_binding.name=projects/*/locations/*/dataAttributeBindings/*}:\x16\x64\x61ta_attribute_binding\x12\xef\x01\n\x1a\x44\x65leteDataAttributeBinding\x12;.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/dataAttributeBindings/*}\x12\xe0\x01\n\x19ListDataAttributeBindings\x12:.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest\x1a;.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*}/dataAttributeBindings\x12\xcd\x01\n\x17GetDataAttributeBinding\x12\x38.google.cloud.dataplex.v1.GetDataAttributeBindingRequest\x1a..google.cloud.dataplex.v1.DataAttributeBinding\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/dataAttributeBindings/*}\x12\x93\x02\n\x13\x43reateDataAttribute\x12\x34.google.cloud.dataplex.v1.CreateDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41\"\n\rDataAttribute\x12\x11OperationMetadata\xda\x41\'parent,data_attribute,data_attribute_id\x82\xd3\xe4\x93\x02Q\"?/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes:\x0e\x64\x61ta_attribute\x12\x95\x02\n\x13UpdateDataAttribute\x12\x34.google.cloud.dataplex.v1.UpdateDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41\"\n\rDataAttribute\x12\x11OperationMetadata\xda\x41\x1a\x64\x61ta_attribute,update_mask\x82\xd3\xe4\x93\x02`2N/v1/{data_attribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}:\x0e\x64\x61ta_attribute\x12\xe7\x01\n\x13\x44\x65leteDataAttribute\x12\x34.google.cloud.dataplex.v1.DeleteDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}\x12\xd1\x01\n\x12ListDataAttributes\x12\x33.google.cloud.dataplex.v1.ListDataAttributesRequest\x1a\x34.google.cloud.dataplex.v1.ListDataAttributesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes\x12\xbe\x01\n\x10GetDataAttribute\x12\x31.google.cloud.dataplex.v1.GetDataAttributeRequest\x1a\'.google.cloud.dataplex.v1.DataAttribute\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBm\n\x1c\x63om.google.cloud.dataplex.v1B\x11\x44\x61taTaxonomyProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.dataplex.v1.ResourceAccessSpec", "google/cloud/dataplex/v1/security.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - DataTaxonomy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataTaxonomy").msgclass - DataAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttribute").msgclass - DataAttributeBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttributeBinding").msgclass - DataAttributeBinding::Path = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttributeBinding.Path").msgclass - CreateDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataTaxonomyRequest").msgclass - UpdateDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataTaxonomyRequest").msgclass - GetDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataTaxonomyRequest").msgclass - ListDataTaxonomiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataTaxonomiesRequest").msgclass - ListDataTaxonomiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataTaxonomiesResponse").msgclass - DeleteDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataTaxonomyRequest").msgclass - CreateDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataAttributeRequest").msgclass - UpdateDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataAttributeRequest").msgclass - GetDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataAttributeRequest").msgclass - ListDataAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributesRequest").msgclass - ListDataAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributesResponse").msgclass - DeleteDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataAttributeRequest").msgclass - CreateDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataAttributeBindingRequest").msgclass - UpdateDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest").msgclass - GetDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataAttributeBindingRequest").msgclass - ListDataAttributeBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributeBindingsRequest").msgclass - ListDataAttributeBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributeBindingsResponse").msgclass - DeleteDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb deleted file mode 100644 index 12feb1928fc2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" - -require "google/cloud/dataplex/v1/data_taxonomy_service/credentials" -require "google/cloud/dataplex/v1/data_taxonomy_service/paths" -require "google/cloud/dataplex/v1/data_taxonomy_service/operations" -require "google/cloud/dataplex/v1/data_taxonomy_service/client" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest" - -module Google - module Cloud - module Dataplex - module V1 - ## - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1/data_taxonomy_service" - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/dataplex/v1/data_taxonomy_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - module DataTaxonomyService - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_taxonomy_service", "helpers.rb" -require "google/cloud/dataplex/v1/data_taxonomy_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb deleted file mode 100644 index c516748b8f4e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +++ /dev/null @@ -1,1966 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/data_taxonomy_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - ## - # Client for the DataTaxonomyService service. - # - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - # - class Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_taxonomy_service_stub - - ## - # Configure the DataTaxonomyService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataTaxonomyService clients - # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTaxonomyService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_taxonomy_service_stub.universe_domain - end - - ## - # Create a new DataTaxonomyService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataTaxonomyService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/dataplex/v1/data_taxonomy_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @data_taxonomy_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_taxonomy_service_stub.endpoint - config.universe_domain = @data_taxonomy_service_stub.universe_domain - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_taxonomy_service_stub.endpoint - config.universe_domain = @data_taxonomy_service_stub.universe_domain - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Create a DataTaxonomy resource. - # - # @overload create_data_taxonomy(request, options = nil) - # Pass arguments to `create_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_taxonomy(parent: nil, data_taxonomy_id: nil, data_taxonomy: nil, validate_only: nil) - # Pass arguments to `create_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 data_taxonomy_id [::String] - # 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 data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] - # Required. DataTaxonomy resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new - # - # # Call the create_data_taxonomy method. - # result = client.create_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_data_taxonomy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :create_data_taxonomy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataTaxonomy resource. - # - # @overload update_data_taxonomy(request, options = nil) - # Pass arguments to `update_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_taxonomy(update_mask: nil, data_taxonomy: nil, validate_only: nil) - # Pass arguments to `update_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new - # - # # Call the update_data_taxonomy method. - # result = client.update_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_taxonomy&.name - header_params["data_taxonomy.name"] = request.data_taxonomy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_taxonomy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :update_data_taxonomy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - # must be deleted before the DataTaxonomy can be deleted. - # - # @overload delete_data_taxonomy(request, options = nil) - # Pass arguments to `delete_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_taxonomy(name: nil, etag: nil) - # Pass arguments to `delete_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value,the DeleteDataTaxonomy method returns an ABORTED error. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new - # - # # Call the delete_data_taxonomy method. - # result = client.delete_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_data_taxonomy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :delete_data_taxonomy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataTaxonomy resources in a project and location. - # - # @overload list_data_taxonomies(request, options = nil) - # Pass arguments to `list_data_taxonomies` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_taxonomies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new - # - # # Call the list_data_taxonomies method. - # result = client.list_data_taxonomies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. - # p item - # end - # - def list_data_taxonomies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_taxonomies.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_taxonomies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_taxonomies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :list_data_taxonomies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_taxonomies, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a DataTaxonomy resource. - # - # @overload get_data_taxonomy(request, options = nil) - # Pass arguments to `get_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_taxonomy(name: nil) - # Pass arguments to `get_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new - # - # # Call the get_data_taxonomy method. - # result = client.get_data_taxonomy request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. - # p result - # - def get_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_taxonomy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :get_data_taxonomy, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a DataAttributeBinding resource. - # - # @overload create_data_attribute_binding(request, options = nil) - # Pass arguments to `create_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_attribute_binding(parent: nil, data_attribute_binding_id: nil, data_attribute_binding: nil, validate_only: nil) - # Pass arguments to `create_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id} - # @param data_attribute_binding_id [::String] - # 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 data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] - # Required. DataAttributeBinding resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new - # - # # Call the create_data_attribute_binding method. - # result = client.create_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_data_attribute_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :create_data_attribute_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataAttributeBinding resource. - # - # @overload update_data_attribute_binding(request, options = nil) - # Pass arguments to `update_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_attribute_binding(update_mask: nil, data_attribute_binding: nil, validate_only: nil) - # Pass arguments to `update_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new - # - # # Call the update_data_attribute_binding method. - # result = client.update_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_attribute_binding&.name - header_params["data_attribute_binding.name"] = request.data_attribute_binding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_attribute_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :update_data_attribute_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataAttributeBinding resource. All attributes within the - # DataAttributeBinding must be deleted before the DataAttributeBinding can be - # deleted. - # - # @overload delete_data_attribute_binding(request, options = nil) - # Pass arguments to `delete_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_attribute_binding(name: nil, etag: nil) - # Pass arguments to `delete_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # @param etag [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new - # - # # Call the delete_data_attribute_binding method. - # result = client.delete_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_data_attribute_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :delete_data_attribute_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataAttributeBinding resources in a project and location. - # - # @overload list_data_attribute_bindings(request, options = nil) - # Pass arguments to `list_data_attribute_bindings` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_attribute_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_attribute_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the Location: - # projects/\\{project_number}/locations/\\{location_id} - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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 order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new - # - # # Call the list_data_attribute_bindings method. - # result = client.list_data_attribute_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. - # p item - # end - # - def list_data_attribute_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_attribute_bindings.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_attribute_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_attribute_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :list_data_attribute_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attribute_bindings, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a DataAttributeBinding resource. - # - # @overload get_data_attribute_binding(request, options = nil) - # Pass arguments to `get_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_attribute_binding(name: nil) - # Pass arguments to `get_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new - # - # # Call the get_data_attribute_binding method. - # result = client.get_data_attribute_binding request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. - # p result - # - def get_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_attribute_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :get_data_attribute_binding, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a DataAttribute resource. - # - # @overload create_data_attribute(request, options = nil) - # Pass arguments to `create_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_attribute(parent: nil, data_attribute_id: nil, data_attribute: nil, validate_only: nil) - # Pass arguments to `create_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param data_attribute_id [::String] - # 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 data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] - # Required. DataAttribute resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new - # - # # Call the create_data_attribute method. - # result = client.create_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_data_attribute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :create_data_attribute, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataAttribute resource. - # - # @overload update_data_attribute(request, options = nil) - # Pass arguments to `update_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_attribute(update_mask: nil, data_attribute: nil, validate_only: nil) - # Pass arguments to `update_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new - # - # # Call the update_data_attribute method. - # result = client.update_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_attribute&.name - header_params["data_attribute.name"] = request.data_attribute.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_attribute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :update_data_attribute, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Data Attribute resource. - # - # @overload delete_data_attribute(request, options = nil) - # Pass arguments to `delete_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_attribute(name: nil, etag: nil) - # Pass arguments to `delete_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteDataAttribute method returns an ABORTED error response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new - # - # # Call the delete_data_attribute method. - # result = client.delete_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_data_attribute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :delete_data_attribute, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Data Attribute resources in a DataTaxonomy. - # - # @overload list_data_attributes(request, options = nil) - # Pass arguments to `list_data_attributes` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataAttributesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_attributes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_attributes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new - # - # # Call the list_data_attributes method. - # result = client.list_data_attributes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. - # p item - # end - # - def list_data_attributes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_attributes.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_attributes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_attributes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :list_data_attributes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attributes, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a Data Attribute resource. - # - # @overload get_data_attribute(request, options = nil) - # Pass arguments to `get_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_attribute(name: nil) - # Pass arguments to `get_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataAttribute] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new - # - # # Call the get_data_attribute method. - # result = client.get_data_attribute request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. - # p result - # - def get_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_attribute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :get_data_attribute, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataTaxonomyService API. - # - # This class represents the configuration for DataTaxonomyService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_data_taxonomy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_taxonomy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_taxonomy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DataTaxonomyService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_taxonomy - ## - # RPC-specific configuration for `update_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_taxonomy - ## - # RPC-specific configuration for `delete_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_taxonomy - ## - # RPC-specific configuration for `list_data_taxonomies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_taxonomies - ## - # RPC-specific configuration for `get_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_taxonomy - ## - # RPC-specific configuration for `create_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_attribute_binding - ## - # RPC-specific configuration for `update_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_attribute_binding - ## - # RPC-specific configuration for `delete_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_attribute_binding - ## - # RPC-specific configuration for `list_data_attribute_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_attribute_bindings - ## - # RPC-specific configuration for `get_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_attribute_binding - ## - # RPC-specific configuration for `create_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_attribute - ## - # RPC-specific configuration for `update_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_attribute - ## - # RPC-specific configuration for `delete_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_attribute - ## - # RPC-specific configuration for `list_data_attributes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_attributes - ## - # RPC-specific configuration for `get_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_attribute - - # @private - def initialize parent_rpcs = nil - create_data_taxonomy_config = parent_rpcs.create_data_taxonomy if parent_rpcs.respond_to? :create_data_taxonomy - @create_data_taxonomy = ::Gapic::Config::Method.new create_data_taxonomy_config - update_data_taxonomy_config = parent_rpcs.update_data_taxonomy if parent_rpcs.respond_to? :update_data_taxonomy - @update_data_taxonomy = ::Gapic::Config::Method.new update_data_taxonomy_config - delete_data_taxonomy_config = parent_rpcs.delete_data_taxonomy if parent_rpcs.respond_to? :delete_data_taxonomy - @delete_data_taxonomy = ::Gapic::Config::Method.new delete_data_taxonomy_config - list_data_taxonomies_config = parent_rpcs.list_data_taxonomies if parent_rpcs.respond_to? :list_data_taxonomies - @list_data_taxonomies = ::Gapic::Config::Method.new list_data_taxonomies_config - get_data_taxonomy_config = parent_rpcs.get_data_taxonomy if parent_rpcs.respond_to? :get_data_taxonomy - @get_data_taxonomy = ::Gapic::Config::Method.new get_data_taxonomy_config - create_data_attribute_binding_config = parent_rpcs.create_data_attribute_binding if parent_rpcs.respond_to? :create_data_attribute_binding - @create_data_attribute_binding = ::Gapic::Config::Method.new create_data_attribute_binding_config - update_data_attribute_binding_config = parent_rpcs.update_data_attribute_binding if parent_rpcs.respond_to? :update_data_attribute_binding - @update_data_attribute_binding = ::Gapic::Config::Method.new update_data_attribute_binding_config - delete_data_attribute_binding_config = parent_rpcs.delete_data_attribute_binding if parent_rpcs.respond_to? :delete_data_attribute_binding - @delete_data_attribute_binding = ::Gapic::Config::Method.new delete_data_attribute_binding_config - list_data_attribute_bindings_config = parent_rpcs.list_data_attribute_bindings if parent_rpcs.respond_to? :list_data_attribute_bindings - @list_data_attribute_bindings = ::Gapic::Config::Method.new list_data_attribute_bindings_config - get_data_attribute_binding_config = parent_rpcs.get_data_attribute_binding if parent_rpcs.respond_to? :get_data_attribute_binding - @get_data_attribute_binding = ::Gapic::Config::Method.new get_data_attribute_binding_config - create_data_attribute_config = parent_rpcs.create_data_attribute if parent_rpcs.respond_to? :create_data_attribute - @create_data_attribute = ::Gapic::Config::Method.new create_data_attribute_config - update_data_attribute_config = parent_rpcs.update_data_attribute if parent_rpcs.respond_to? :update_data_attribute - @update_data_attribute = ::Gapic::Config::Method.new update_data_attribute_config - delete_data_attribute_config = parent_rpcs.delete_data_attribute if parent_rpcs.respond_to? :delete_data_attribute - @delete_data_attribute = ::Gapic::Config::Method.new delete_data_attribute_config - list_data_attributes_config = parent_rpcs.list_data_attributes if parent_rpcs.respond_to? :list_data_attributes - @list_data_attributes = ::Gapic::Config::Method.new list_data_attributes_config - get_data_attribute_config = parent_rpcs.get_data_attribute if parent_rpcs.respond_to? :get_data_attribute - @get_data_attribute = ::Gapic::Config::Method.new get_data_attribute_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb deleted file mode 100644 index 58c35cc846da..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - # Credentials for the DataTaxonomyService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb deleted file mode 100644 index 4d0a0a769ebd..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb +++ /dev/null @@ -1,801 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DataTaxonomyService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTaxonomyService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb deleted file mode 100644 index 24ff999c274b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb +++ /dev/null @@ -1,109 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - # Path helper methods for the DataTaxonomyService API. - module Paths - ## - # Create a fully-qualified DataAttribute resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}` - # - # @param project [String] - # @param location [String] - # @param dataTaxonomy [String] - # @param data_attribute_id [String] - # - # @return [::String] - def data_attribute_path project:, location:, dataTaxonomy:, data_attribute_id: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataTaxonomy cannot contain /" if dataTaxonomy.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataTaxonomies/#{dataTaxonomy}/attributes/#{data_attribute_id}" - end - - ## - # Create a fully-qualified DataAttributeBinding resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}` - # - # @param project [String] - # @param location [String] - # @param data_attribute_binding_id [String] - # - # @return [::String] - def data_attribute_binding_path project:, location:, data_attribute_binding_id: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataAttributeBindings/#{data_attribute_binding_id}" - end - - ## - # Create a fully-qualified DataTaxonomy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}` - # - # @param project [String] - # @param location [String] - # @param data_taxonomy_id [String] - # - # @return [::String] - def data_taxonomy_path project:, location:, data_taxonomy_id: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataTaxonomies/#{data_taxonomy_id}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb deleted file mode 100644 index 9662b3d8beed..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/data_taxonomy_service/credentials" -require "google/cloud/dataplex/v1/data_taxonomy_service/paths" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest/operations" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/data_taxonomy_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - module DataTaxonomyService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb deleted file mode 100644 index ee63c2241640..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb +++ /dev/null @@ -1,1841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/data_taxonomy_pb" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - module Rest - ## - # REST client for the DataTaxonomyService service. - # - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - # - class Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_taxonomy_service_stub - - ## - # Configure the DataTaxonomyService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataTaxonomyService clients - # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTaxonomyService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_taxonomy_service_stub.universe_domain - end - - ## - # Create a new DataTaxonomyService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataTaxonomyService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @data_taxonomy_service_stub = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_taxonomy_service_stub.endpoint - config.universe_domain = @data_taxonomy_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_taxonomy_service_stub.endpoint - config.universe_domain = @data_taxonomy_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Create a DataTaxonomy resource. - # - # @overload create_data_taxonomy(request, options = nil) - # Pass arguments to `create_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_taxonomy(parent: nil, data_taxonomy_id: nil, data_taxonomy: nil, validate_only: nil) - # Pass arguments to `create_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 data_taxonomy_id [::String] - # 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 data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] - # Required. DataTaxonomy resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new - # - # # Call the create_data_taxonomy method. - # result = client.create_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_data_taxonomy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.create_data_taxonomy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataTaxonomy resource. - # - # @overload update_data_taxonomy(request, options = nil) - # Pass arguments to `update_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_taxonomy(update_mask: nil, data_taxonomy: nil, validate_only: nil) - # Pass arguments to `update_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new - # - # # Call the update_data_taxonomy method. - # result = client.update_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_taxonomy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.update_data_taxonomy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - # must be deleted before the DataTaxonomy can be deleted. - # - # @overload delete_data_taxonomy(request, options = nil) - # Pass arguments to `delete_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_taxonomy(name: nil, etag: nil) - # Pass arguments to `delete_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value,the DeleteDataTaxonomy method returns an ABORTED error. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new - # - # # Call the delete_data_taxonomy method. - # result = client.delete_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_data_taxonomy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.delete_data_taxonomy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataTaxonomy resources in a project and location. - # - # @overload list_data_taxonomies(request, options = nil) - # Pass arguments to `list_data_taxonomies` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_taxonomies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new - # - # # Call the list_data_taxonomies method. - # result = client.list_data_taxonomies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. - # p item - # end - # - def list_data_taxonomies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_taxonomies.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_taxonomies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_taxonomies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.list_data_taxonomies request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a DataTaxonomy resource. - # - # @overload get_data_taxonomy(request, options = nil) - # Pass arguments to `get_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_taxonomy(name: nil) - # Pass arguments to `get_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new - # - # # Call the get_data_taxonomy method. - # result = client.get_data_taxonomy request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. - # p result - # - def get_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_taxonomy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.get_data_taxonomy request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a DataAttributeBinding resource. - # - # @overload create_data_attribute_binding(request, options = nil) - # Pass arguments to `create_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_attribute_binding(parent: nil, data_attribute_binding_id: nil, data_attribute_binding: nil, validate_only: nil) - # Pass arguments to `create_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id} - # @param data_attribute_binding_id [::String] - # 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 data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] - # Required. DataAttributeBinding resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new - # - # # Call the create_data_attribute_binding method. - # result = client.create_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_data_attribute_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.create_data_attribute_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataAttributeBinding resource. - # - # @overload update_data_attribute_binding(request, options = nil) - # Pass arguments to `update_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_attribute_binding(update_mask: nil, data_attribute_binding: nil, validate_only: nil) - # Pass arguments to `update_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new - # - # # Call the update_data_attribute_binding method. - # result = client.update_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_attribute_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.update_data_attribute_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataAttributeBinding resource. All attributes within the - # DataAttributeBinding must be deleted before the DataAttributeBinding can be - # deleted. - # - # @overload delete_data_attribute_binding(request, options = nil) - # Pass arguments to `delete_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_attribute_binding(name: nil, etag: nil) - # Pass arguments to `delete_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # @param etag [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new - # - # # Call the delete_data_attribute_binding method. - # result = client.delete_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_data_attribute_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.delete_data_attribute_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataAttributeBinding resources in a project and location. - # - # @overload list_data_attribute_bindings(request, options = nil) - # Pass arguments to `list_data_attribute_bindings` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_attribute_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_attribute_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the Location: - # projects/\\{project_number}/locations/\\{location_id} - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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 order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new - # - # # Call the list_data_attribute_bindings method. - # result = client.list_data_attribute_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. - # p item - # end - # - def list_data_attribute_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_attribute_bindings.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_attribute_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_attribute_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.list_data_attribute_bindings request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a DataAttributeBinding resource. - # - # @overload get_data_attribute_binding(request, options = nil) - # Pass arguments to `get_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_attribute_binding(name: nil) - # Pass arguments to `get_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new - # - # # Call the get_data_attribute_binding method. - # result = client.get_data_attribute_binding request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. - # p result - # - def get_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_attribute_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.get_data_attribute_binding request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a DataAttribute resource. - # - # @overload create_data_attribute(request, options = nil) - # Pass arguments to `create_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_attribute(parent: nil, data_attribute_id: nil, data_attribute: nil, validate_only: nil) - # Pass arguments to `create_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param data_attribute_id [::String] - # 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 data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] - # Required. DataAttribute resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new - # - # # Call the create_data_attribute method. - # result = client.create_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_data_attribute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.create_data_attribute request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataAttribute resource. - # - # @overload update_data_attribute(request, options = nil) - # Pass arguments to `update_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_attribute(update_mask: nil, data_attribute: nil, validate_only: nil) - # Pass arguments to `update_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new - # - # # Call the update_data_attribute method. - # result = client.update_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_attribute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.update_data_attribute request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Data Attribute resource. - # - # @overload delete_data_attribute(request, options = nil) - # Pass arguments to `delete_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_attribute(name: nil, etag: nil) - # Pass arguments to `delete_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteDataAttribute method returns an ABORTED error response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new - # - # # Call the delete_data_attribute method. - # result = client.delete_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_data_attribute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.delete_data_attribute request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Data Attribute resources in a DataTaxonomy. - # - # @overload list_data_attributes(request, options = nil) - # Pass arguments to `list_data_attributes` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataAttributesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_attributes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_attributes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new - # - # # Call the list_data_attributes method. - # result = client.list_data_attributes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. - # p item - # end - # - def list_data_attributes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_attributes.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_attributes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_attributes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.list_data_attributes request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a Data Attribute resource. - # - # @overload get_data_attribute(request, options = nil) - # Pass arguments to `get_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_attribute(name: nil) - # Pass arguments to `get_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttribute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new - # - # # Call the get_data_attribute method. - # result = client.get_data_attribute request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. - # p result - # - def get_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_attribute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.get_data_attribute request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataTaxonomyService REST API. - # - # This class represents the configuration for DataTaxonomyService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_data_taxonomy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_taxonomy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_taxonomy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the DataTaxonomyService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_taxonomy - ## - # RPC-specific configuration for `update_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_taxonomy - ## - # RPC-specific configuration for `delete_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_taxonomy - ## - # RPC-specific configuration for `list_data_taxonomies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_taxonomies - ## - # RPC-specific configuration for `get_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_taxonomy - ## - # RPC-specific configuration for `create_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_attribute_binding - ## - # RPC-specific configuration for `update_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_attribute_binding - ## - # RPC-specific configuration for `delete_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_attribute_binding - ## - # RPC-specific configuration for `list_data_attribute_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_attribute_bindings - ## - # RPC-specific configuration for `get_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_attribute_binding - ## - # RPC-specific configuration for `create_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_attribute - ## - # RPC-specific configuration for `update_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_attribute - ## - # RPC-specific configuration for `delete_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_attribute - ## - # RPC-specific configuration for `list_data_attributes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_attributes - ## - # RPC-specific configuration for `get_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_attribute - - # @private - def initialize parent_rpcs = nil - create_data_taxonomy_config = parent_rpcs.create_data_taxonomy if parent_rpcs.respond_to? :create_data_taxonomy - @create_data_taxonomy = ::Gapic::Config::Method.new create_data_taxonomy_config - update_data_taxonomy_config = parent_rpcs.update_data_taxonomy if parent_rpcs.respond_to? :update_data_taxonomy - @update_data_taxonomy = ::Gapic::Config::Method.new update_data_taxonomy_config - delete_data_taxonomy_config = parent_rpcs.delete_data_taxonomy if parent_rpcs.respond_to? :delete_data_taxonomy - @delete_data_taxonomy = ::Gapic::Config::Method.new delete_data_taxonomy_config - list_data_taxonomies_config = parent_rpcs.list_data_taxonomies if parent_rpcs.respond_to? :list_data_taxonomies - @list_data_taxonomies = ::Gapic::Config::Method.new list_data_taxonomies_config - get_data_taxonomy_config = parent_rpcs.get_data_taxonomy if parent_rpcs.respond_to? :get_data_taxonomy - @get_data_taxonomy = ::Gapic::Config::Method.new get_data_taxonomy_config - create_data_attribute_binding_config = parent_rpcs.create_data_attribute_binding if parent_rpcs.respond_to? :create_data_attribute_binding - @create_data_attribute_binding = ::Gapic::Config::Method.new create_data_attribute_binding_config - update_data_attribute_binding_config = parent_rpcs.update_data_attribute_binding if parent_rpcs.respond_to? :update_data_attribute_binding - @update_data_attribute_binding = ::Gapic::Config::Method.new update_data_attribute_binding_config - delete_data_attribute_binding_config = parent_rpcs.delete_data_attribute_binding if parent_rpcs.respond_to? :delete_data_attribute_binding - @delete_data_attribute_binding = ::Gapic::Config::Method.new delete_data_attribute_binding_config - list_data_attribute_bindings_config = parent_rpcs.list_data_attribute_bindings if parent_rpcs.respond_to? :list_data_attribute_bindings - @list_data_attribute_bindings = ::Gapic::Config::Method.new list_data_attribute_bindings_config - get_data_attribute_binding_config = parent_rpcs.get_data_attribute_binding if parent_rpcs.respond_to? :get_data_attribute_binding - @get_data_attribute_binding = ::Gapic::Config::Method.new get_data_attribute_binding_config - create_data_attribute_config = parent_rpcs.create_data_attribute if parent_rpcs.respond_to? :create_data_attribute - @create_data_attribute = ::Gapic::Config::Method.new create_data_attribute_config - update_data_attribute_config = parent_rpcs.update_data_attribute if parent_rpcs.respond_to? :update_data_attribute - @update_data_attribute = ::Gapic::Config::Method.new update_data_attribute_config - delete_data_attribute_config = parent_rpcs.delete_data_attribute if parent_rpcs.respond_to? :delete_data_attribute - @delete_data_attribute = ::Gapic::Config::Method.new delete_data_attribute_config - list_data_attributes_config = parent_rpcs.list_data_attributes if parent_rpcs.respond_to? :list_data_attributes - @list_data_attributes = ::Gapic::Config::Method.new list_data_attributes_config - get_data_attribute_config = parent_rpcs.get_data_attribute if parent_rpcs.respond_to? :get_data_attribute - @get_data_attribute = ::Gapic::Config::Method.new get_data_attribute_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb deleted file mode 100644 index e94682c4a3c8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb +++ /dev/null @@ -1,895 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DataTaxonomyService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTaxonomyService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb deleted file mode 100644 index cf511be91af6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb +++ /dev/null @@ -1,960 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/data_taxonomy_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - module Rest - ## - # REST service stub for the DataTaxonomyService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the create_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_data_taxonomy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_taxonomy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_data_taxonomy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_taxonomy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_data_taxonomy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_taxonomy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_data_taxonomies REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] - # A result object deserialized from the server's reply - def list_data_taxonomies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_taxonomies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # A result object deserialized from the server's reply - def get_data_taxonomy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_taxonomy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataTaxonomy.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_data_attribute_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_attribute_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_data_attribute_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_attribute_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_data_attribute_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_attribute_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_data_attribute_bindings REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] - # A result object deserialized from the server's reply - def list_data_attribute_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_attribute_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # A result object deserialized from the server's reply - def get_data_attribute_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_attribute_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_data_attribute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_attribute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_data_attribute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_attribute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_data_attribute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_attribute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_data_attributes REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] - # A result object deserialized from the server's reply - def list_data_attributes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_attributes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttribute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # A result object deserialized from the server's reply - def get_data_attribute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_attribute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataAttribute.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_taxonomy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTaxonomies", - body: "data_taxonomy", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_taxonomy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_taxonomy.name}", - body: "data_taxonomy", - matches: [ - ["data_taxonomy.name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_taxonomy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_taxonomies REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_taxonomies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataTaxonomies", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_taxonomy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_attribute_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataAttributeBindings", - body: "data_attribute_binding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_attribute_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_attribute_binding.name}", - body: "data_attribute_binding", - matches: [ - ["data_attribute_binding.name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_attribute_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_attribute_bindings REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_attribute_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataAttributeBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_attribute_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_attribute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/attributes", - body: "data_attribute", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_attribute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_attribute.name}", - body: "data_attribute", - matches: [ - ["data_attribute.name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_attribute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_attributes REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_attributes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/attributes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_attribute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb deleted file mode 100644 index ba8715a2a0bc..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb +++ /dev/null @@ -1,77 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/data_taxonomy.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# - -require 'grpc' -require 'google/cloud/dataplex/v1/data_taxonomy_pb' - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.DataTaxonomyService' - - # Create a DataTaxonomy resource. - rpc :CreateDataTaxonomy, ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Google::Longrunning::Operation - # Updates a DataTaxonomy resource. - rpc :UpdateDataTaxonomy, ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Google::Longrunning::Operation - # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - # must be deleted before the DataTaxonomy can be deleted. - rpc :DeleteDataTaxonomy, ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Google::Longrunning::Operation - # Lists DataTaxonomy resources in a project and location. - rpc :ListDataTaxonomies, ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse - # Retrieves a DataTaxonomy resource. - rpc :GetDataTaxonomy, ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Google::Cloud::Dataplex::V1::DataTaxonomy - # Create a DataAttributeBinding resource. - rpc :CreateDataAttributeBinding, ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Google::Longrunning::Operation - # Updates a DataAttributeBinding resource. - rpc :UpdateDataAttributeBinding, ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Google::Longrunning::Operation - # Deletes a DataAttributeBinding resource. All attributes within the - # DataAttributeBinding must be deleted before the DataAttributeBinding can be - # deleted. - rpc :DeleteDataAttributeBinding, ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Google::Longrunning::Operation - # Lists DataAttributeBinding resources in a project and location. - rpc :ListDataAttributeBindings, ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse - # Retrieves a DataAttributeBinding resource. - rpc :GetDataAttributeBinding, ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Google::Cloud::Dataplex::V1::DataAttributeBinding - # Create a DataAttribute resource. - rpc :CreateDataAttribute, ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Google::Longrunning::Operation - # Updates a DataAttribute resource. - rpc :UpdateDataAttribute, ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Google::Longrunning::Operation - # Deletes a Data Attribute resource. - rpc :DeleteDataAttribute, ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Google::Longrunning::Operation - # Lists Data Attribute resources in a DataTaxonomy. - rpc :ListDataAttributes, ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse - # Retrieves a Data Attribute resource. - rpc :GetDataAttribute, ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Google::Cloud::Dataplex::V1::DataAttribute - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb deleted file mode 100644 index aefbd2740e2d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" - -require "google/cloud/dataplex/v1/dataplex_service/credentials" -require "google/cloud/dataplex/v1/dataplex_service/paths" -require "google/cloud/dataplex/v1/dataplex_service/operations" -require "google/cloud/dataplex/v1/dataplex_service/client" -require "google/cloud/dataplex/v1/dataplex_service/rest" - -module Google - module Cloud - module Dataplex - module 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. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1/dataplex_service" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/dataplex/v1/dataplex_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module DataplexService - end - end - end - end -end - -helper_path = ::File.join __dir__, "dataplex_service", "helpers.rb" -require "google/cloud/dataplex/v1/dataplex_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb deleted file mode 100644 index d761c77f09aa..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +++ /dev/null @@ -1,3950 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - ## - # Client for the DataplexService service. - # - # 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 Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dataplex_service_stub - - ## - # Configure the DataplexService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataplexService clients - # ::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_lake.timeout = 60.0 - - default_config.rpcs.update_lake.timeout = 60.0 - - default_config.rpcs.delete_lake.timeout = 60.0 - - default_config.rpcs.list_lakes.timeout = 60.0 - default_config.rpcs.list_lakes.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_lake.timeout = 60.0 - default_config.rpcs.get_lake.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_lake_actions.timeout = 60.0 - default_config.rpcs.list_lake_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_zone.timeout = 60.0 - - default_config.rpcs.update_zone.timeout = 60.0 - - default_config.rpcs.delete_zone.timeout = 60.0 - - default_config.rpcs.list_zones.timeout = 60.0 - default_config.rpcs.list_zones.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_zone.timeout = 60.0 - default_config.rpcs.get_zone.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_zone_actions.timeout = 60.0 - default_config.rpcs.list_zone_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_asset.timeout = 60.0 - - default_config.rpcs.update_asset.timeout = 60.0 - - default_config.rpcs.delete_asset.timeout = 60.0 - - default_config.rpcs.list_assets.timeout = 60.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_asset.timeout = 60.0 - default_config.rpcs.get_asset.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_asset_actions.timeout = 60.0 - default_config.rpcs.list_asset_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_task.timeout = 60.0 - - default_config.rpcs.update_task.timeout = 60.0 - - default_config.rpcs.delete_task.timeout = 60.0 - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_jobs.timeout = 60.0 - default_config.rpcs.list_jobs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_job.timeout = 60.0 - default_config.rpcs.get_job.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.cancel_job.timeout = 60.0 - - default_config.rpcs.create_environment.timeout = 60.0 - - default_config.rpcs.update_environment.timeout = 60.0 - - default_config.rpcs.delete_environment.timeout = 60.0 - - default_config.rpcs.list_environments.timeout = 60.0 - default_config.rpcs.list_environments.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_environment.timeout = 60.0 - default_config.rpcs.get_environment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataplexService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @dataplex_service_stub.universe_domain - end - - ## - # Create a new DataplexService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataplexService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/dataplex/v1/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @dataplex_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dataplex::V1::DataplexService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataplex_service_stub.endpoint - config.universe_domain = @dataplex_service_stub.universe_domain - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataplex_service_stub.endpoint - config.universe_domain = @dataplex_service_stub.universe_domain - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataplexService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Creates a lake resource. - # - # @overload create_lake(request, options = nil) - # Pass arguments to `create_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil) - # Pass arguments to `create_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 lake_id [::String] - # 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 lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] - # Required. Lake resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new - # - # # Call the create_lake method. - # result = client.create_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_lake.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :create_lake, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a lake resource. - # - # @overload update_lake(request, options = nil) - # Pass arguments to `update_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_lake(update_mask: nil, lake: nil, validate_only: nil) - # Pass arguments to `update_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new - # - # # Call the update_lake method. - # result = client.update_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.lake&.name - header_params["lake.name"] = request.lake.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_lake.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :update_lake, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a lake resource. All zones within the lake must be deleted before - # the lake can be deleted. - # - # @overload delete_lake(request, options = nil) - # Pass arguments to `delete_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_lake(name: nil) - # Pass arguments to `delete_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new - # - # # Call the delete_lake method. - # result = client.delete_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_lake.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :delete_lake, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists lake resources in a project and location. - # - # @overload list_lakes(request, options = nil) - # Pass arguments to `list_lakes` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListLakesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lakes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListLakesRequest.new - # - # # Call the list_lakes method. - # result = client.list_lakes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. - # p item - # end - # - def list_lakes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_lakes.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_lakes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lakes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_lakes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lakes, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a lake resource. - # - # @overload get_lake(request, options = nil) - # Pass arguments to `get_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_lake(name: nil) - # Pass arguments to `get_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Lake] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Lake] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetLakeRequest.new - # - # # Call the get_lake method. - # result = client.get_lake request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Lake. - # p result - # - def get_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_lake.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_lake, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in a lake. - # - # @overload list_lake_actions(request, options = nil) - # Pass arguments to `list_lake_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListLakeActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_lake_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_lake_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new - # - # # Call the list_lake_actions method. - # result = client.list_lake_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_lake_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_lake_actions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_lake_actions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lake_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_lake_actions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a zone resource within a lake. - # - # @overload create_zone(request, options = nil) - # Pass arguments to `create_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil) - # Pass arguments to `create_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param zone_id [::String] - # 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 zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] - # Required. Zone resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new - # - # # Call the create_zone method. - # result = client.create_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_zone.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :create_zone, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a zone resource. - # - # @overload update_zone(request, options = nil) - # Pass arguments to `update_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_zone(update_mask: nil, zone: nil, validate_only: nil) - # Pass arguments to `update_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new - # - # # Call the update_zone method. - # result = client.update_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.zone&.name - header_params["zone.name"] = request.zone.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_zone.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :update_zone, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a zone resource. All assets within a zone must be deleted before - # the zone can be deleted. - # - # @overload delete_zone(request, options = nil) - # Pass arguments to `delete_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_zone(name: nil) - # Pass arguments to `delete_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new - # - # # Call the delete_zone method. - # result = client.delete_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_zone.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :delete_zone, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists zone resources in a lake. - # - # @overload list_zones(request, options = nil) - # Pass arguments to `list_zones` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListZonesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_zones` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListZonesRequest.new - # - # # Call the list_zones method. - # result = client.list_zones request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. - # p item - # end - # - def list_zones request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZonesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_zones.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_zones.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_zones.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_zones, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zones, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a zone resource. - # - # @overload get_zone(request, options = nil) - # Pass arguments to `get_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_zone(name: nil) - # Pass arguments to `get_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Zone] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Zone] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetZoneRequest.new - # - # # Call the get_zone method. - # result = client.get_zone request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Zone. - # p result - # - def get_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_zone.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_zone, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in a zone. - # - # @overload list_zone_actions(request, options = nil) - # Pass arguments to `list_zone_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListZoneActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_zone_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_zone_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new - # - # # Call the list_zone_actions method. - # result = client.list_zone_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_zone_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_zone_actions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_zone_actions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_zone_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_zone_actions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an asset resource. - # - # @overload create_asset(request, options = nil) - # Pass arguments to `create_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil) - # Pass arguments to `create_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param asset_id [::String] - # 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 asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] - # Required. Asset resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new - # - # # Call the create_asset method. - # result = client.create_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :create_asset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an asset resource. - # - # @overload update_asset(request, options = nil) - # Pass arguments to `update_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_asset(update_mask: nil, asset: nil, validate_only: nil) - # Pass arguments to `update_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new - # - # # Call the update_asset method. - # result = client.update_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.asset&.name - header_params["asset.name"] = request.asset.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :update_asset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an asset resource. The referenced storage resource is detached - # (default) or deleted based on the associated Lifecycle policy. - # - # @overload delete_asset(request, options = nil) - # Pass arguments to `delete_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_asset(name: nil) - # Pass arguments to `delete_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new - # - # # Call the delete_asset method. - # result = client.delete_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :delete_asset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists asset resources in a zone. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_assets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_assets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_assets, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves an asset resource. - # - # @overload get_asset(request, options = nil) - # Pass arguments to `get_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_asset(name: nil) - # Pass arguments to `get_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Asset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Asset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetAssetRequest.new - # - # # Call the get_asset method. - # result = client.get_asset request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Asset. - # p result - # - def get_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_asset, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in an asset. - # - # @overload list_asset_actions(request, options = nil) - # Pass arguments to `list_asset_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAssetActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_asset_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_asset_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new - # - # # Call the list_asset_actions method. - # result = client.list_asset_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_asset_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_asset_actions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_asset_actions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_asset_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_asset_actions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a task resource within a lake. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_task(parent: nil, task_id: nil, task: nil, validate_only: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param task_id [::String] - # Required. Task identifier. - # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] - # Required. Task resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :create_task, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the task resource. - # - # @overload update_task(request, options = nil) - # Pass arguments to `update_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_task(update_mask: nil, task: nil, validate_only: nil) - # Pass arguments to `update_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new - # - # # Call the update_task method. - # result = client.update_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.task&.name - header_params["task.name"] = request.task.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :update_task, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete the task resource. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_task(name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :delete_task, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists tasks under the given lake. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_tasks, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get task resource. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_task(name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_task, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Jobs under the given task. - # - # @overload list_jobs(request, options = nil) - # Pass arguments to `list_jobs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_jobs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListJobsRequest.new - # - # # Call the list_jobs method. - # result = client.list_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Job. - # p item - # end - # - def list_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_jobs.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_jobs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_jobs, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Run an on demand execution of a Task. - # - # @overload run_task(request, options = nil) - # Pass arguments to `run_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::RunTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_task(name: nil, labels: nil, args: nil) - # Pass arguments to `run_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @param labels [::Hash{::String => ::String}] - # 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 args [::Hash{::String => ::String}] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::RunTaskRequest.new - # - # # Call the run_task method. - # result = client.run_task request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. - # p result - # - def run_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :run_task, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get job resource. - # - # @overload get_job(request, options = nil) - # Pass arguments to `get_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_job(name: nil) - # Pass arguments to `get_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Job] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Job] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetJobRequest.new - # - # # Call the get_job method. - # result = client.get_job request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Job. - # p result - # - def get_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_job.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_job, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancel jobs running for the task resource. - # - # @overload cancel_job(request, options = nil) - # Pass arguments to `cancel_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CancelJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_job(name: nil) - # Pass arguments to `cancel_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CancelJobRequest.new - # - # # Call the cancel_job method. - # result = client.cancel_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_job.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :cancel_job, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create an environment resource. - # - # @overload create_environment(request, options = nil) - # Pass arguments to `create_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_environment(parent: nil, environment_id: nil, environment: nil, validate_only: nil) - # Pass arguments to `create_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - # @param environment_id [::String] - # 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 environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] - # Required. Environment resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new - # - # # Call the create_environment method. - # result = client.create_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_environment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :create_environment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the environment resource. - # - # @overload update_environment(request, options = nil) - # Pass arguments to `update_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_environment(update_mask: nil, environment: nil, validate_only: nil) - # Pass arguments to `update_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new - # - # # Call the update_environment method. - # result = client.update_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.environment&.name - header_params["environment.name"] = request.environment.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_environment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :update_environment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete the environment resource. All the child resources must have been - # deleted before environment deletion can be initiated. - # - # @overload delete_environment(request, options = nil) - # Pass arguments to `delete_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_environment(name: nil) - # Pass arguments to `delete_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the environment: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new - # - # # Call the delete_environment method. - # result = client.delete_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_environment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :delete_environment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists environments under the given lake. - # - # @overload list_environments(request, options = nil) - # Pass arguments to `list_environments` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_environments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_environments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new - # - # # Call the list_environments method. - # result = client.list_environments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Environment. - # p item - # end - # - def list_environments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_environments.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_environments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_environments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_environments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_environments, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get environment resource. - # - # @overload get_environment(request, options = nil) - # Pass arguments to `get_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_environment(name: nil) - # Pass arguments to `get_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the environment: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Environment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Environment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new - # - # # Call the get_environment method. - # result = client.get_environment request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Environment. - # p result - # - def get_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_environment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_environment, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists session resources in an environment. - # - # @overload list_sessions(request, options = nil) - # Pass arguments to `list_sessions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListSessionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListSessionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_sessions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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 - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new - # - # # Call the list_sessions method. - # result = client.list_sessions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Session. - # p item - # end - # - def list_sessions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListSessionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_sessions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_sessions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sessions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_sessions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_sessions, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataplexService API. - # - # This class represents the configuration for DataplexService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_lake to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_lake.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_lake.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DataplexService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lake - ## - # RPC-specific configuration for `update_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lake - ## - # RPC-specific configuration for `delete_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lake - ## - # RPC-specific configuration for `list_lakes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lakes - ## - # RPC-specific configuration for `get_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lake - ## - # RPC-specific configuration for `list_lake_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lake_actions - ## - # RPC-specific configuration for `create_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :create_zone - ## - # RPC-specific configuration for `update_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :update_zone - ## - # RPC-specific configuration for `delete_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_zone - ## - # RPC-specific configuration for `list_zones` - # @return [::Gapic::Config::Method] - # - attr_reader :list_zones - ## - # RPC-specific configuration for `get_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :get_zone - ## - # RPC-specific configuration for `list_zone_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_zone_actions - ## - # RPC-specific configuration for `create_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_asset - ## - # RPC-specific configuration for `update_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_asset - ## - # RPC-specific configuration for `delete_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_asset - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `get_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_asset - ## - # RPC-specific configuration for `list_asset_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_asset_actions - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `update_task` - # @return [::Gapic::Config::Method] - # - attr_reader :update_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `list_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_jobs - ## - # RPC-specific configuration for `run_task` - # @return [::Gapic::Config::Method] - # - attr_reader :run_task - ## - # RPC-specific configuration for `get_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job - ## - # RPC-specific configuration for `cancel_job` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_job - ## - # RPC-specific configuration for `create_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_environment - ## - # RPC-specific configuration for `update_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_environment - ## - # RPC-specific configuration for `delete_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_environment - ## - # RPC-specific configuration for `list_environments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_environments - ## - # RPC-specific configuration for `get_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_environment - ## - # RPC-specific configuration for `list_sessions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sessions - - # @private - def initialize parent_rpcs = nil - create_lake_config = parent_rpcs.create_lake if parent_rpcs.respond_to? :create_lake - @create_lake = ::Gapic::Config::Method.new create_lake_config - update_lake_config = parent_rpcs.update_lake if parent_rpcs.respond_to? :update_lake - @update_lake = ::Gapic::Config::Method.new update_lake_config - delete_lake_config = parent_rpcs.delete_lake if parent_rpcs.respond_to? :delete_lake - @delete_lake = ::Gapic::Config::Method.new delete_lake_config - list_lakes_config = parent_rpcs.list_lakes if parent_rpcs.respond_to? :list_lakes - @list_lakes = ::Gapic::Config::Method.new list_lakes_config - get_lake_config = parent_rpcs.get_lake if parent_rpcs.respond_to? :get_lake - @get_lake = ::Gapic::Config::Method.new get_lake_config - list_lake_actions_config = parent_rpcs.list_lake_actions if parent_rpcs.respond_to? :list_lake_actions - @list_lake_actions = ::Gapic::Config::Method.new list_lake_actions_config - create_zone_config = parent_rpcs.create_zone if parent_rpcs.respond_to? :create_zone - @create_zone = ::Gapic::Config::Method.new create_zone_config - update_zone_config = parent_rpcs.update_zone if parent_rpcs.respond_to? :update_zone - @update_zone = ::Gapic::Config::Method.new update_zone_config - delete_zone_config = parent_rpcs.delete_zone if parent_rpcs.respond_to? :delete_zone - @delete_zone = ::Gapic::Config::Method.new delete_zone_config - list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones - @list_zones = ::Gapic::Config::Method.new list_zones_config - get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone - @get_zone = ::Gapic::Config::Method.new get_zone_config - list_zone_actions_config = parent_rpcs.list_zone_actions if parent_rpcs.respond_to? :list_zone_actions - @list_zone_actions = ::Gapic::Config::Method.new list_zone_actions_config - create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset - @create_asset = ::Gapic::Config::Method.new create_asset_config - update_asset_config = parent_rpcs.update_asset if parent_rpcs.respond_to? :update_asset - @update_asset = ::Gapic::Config::Method.new update_asset_config - delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset - @delete_asset = ::Gapic::Config::Method.new delete_asset_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset - @get_asset = ::Gapic::Config::Method.new get_asset_config - list_asset_actions_config = parent_rpcs.list_asset_actions if parent_rpcs.respond_to? :list_asset_actions - @list_asset_actions = ::Gapic::Config::Method.new list_asset_actions_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task - @update_task = ::Gapic::Config::Method.new update_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs - @list_jobs = ::Gapic::Config::Method.new list_jobs_config - run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task - @run_task = ::Gapic::Config::Method.new run_task_config - get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job - @get_job = ::Gapic::Config::Method.new get_job_config - cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job - @cancel_job = ::Gapic::Config::Method.new cancel_job_config - create_environment_config = parent_rpcs.create_environment if parent_rpcs.respond_to? :create_environment - @create_environment = ::Gapic::Config::Method.new create_environment_config - update_environment_config = parent_rpcs.update_environment if parent_rpcs.respond_to? :update_environment - @update_environment = ::Gapic::Config::Method.new update_environment_config - delete_environment_config = parent_rpcs.delete_environment if parent_rpcs.respond_to? :delete_environment - @delete_environment = ::Gapic::Config::Method.new delete_environment_config - list_environments_config = parent_rpcs.list_environments if parent_rpcs.respond_to? :list_environments - @list_environments = ::Gapic::Config::Method.new list_environments_config - get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment - @get_environment = ::Gapic::Config::Method.new get_environment_config - list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions - @list_sessions = ::Gapic::Config::Method.new list_sessions_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb deleted file mode 100644 index ca24868d1300..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - # Credentials for the DataplexService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb deleted file mode 100644 index e9203215706a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +++ /dev/null @@ -1,801 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DataplexService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataplexService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb deleted file mode 100644 index bf8d60dd39e3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb +++ /dev/null @@ -1,178 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - # Path helper methods for the DataplexService API. - module Paths - ## - # Create a fully-qualified Asset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # @param asset [String] - # - # @return [::String] - def asset_path project:, location:, lake:, zone:, asset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/assets/#{asset}" - end - - ## - # Create a fully-qualified Environment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param environment [String] - # - # @return [::String] - def environment_path project:, location:, lake:, environment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/environments/#{environment}" - end - - ## - # Create a fully-qualified Job resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param task [String] - # @param job [String] - # - # @return [::String] - def job_path project:, location:, lake:, task:, job: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "task cannot contain /" if task.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/tasks/#{task}/jobs/#{job}" - end - - ## - # Create a fully-qualified Lake resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # - # @return [::String] - def lake_path project:, location:, lake: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Task resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param task [String] - # - # @return [::String] - def task_path project:, location:, lake:, task: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/tasks/#{task}" - end - - ## - # Create a fully-qualified Zone resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # - # @return [::String] - def zone_path project:, location:, lake:, zone: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb deleted file mode 100644 index 76c9f9aa9a0d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/dataplex_service/credentials" -require "google/cloud/dataplex/v1/dataplex_service/paths" -require "google/cloud/dataplex/v1/dataplex_service/rest/operations" -require "google/cloud/dataplex/v1/dataplex_service/rest/client" - -module Google - module Cloud - module Dataplex - module 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. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/dataplex_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module DataplexService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/dataplex_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb deleted file mode 100644 index 6c8e3c4c6d88..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +++ /dev/null @@ -1,3700 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/service_pb" -require "google/cloud/dataplex/v1/dataplex_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - module Rest - ## - # REST client for the DataplexService service. - # - # 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 Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dataplex_service_stub - - ## - # Configure the DataplexService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataplexService clients - # ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_lake.timeout = 60.0 - - default_config.rpcs.update_lake.timeout = 60.0 - - default_config.rpcs.delete_lake.timeout = 60.0 - - default_config.rpcs.list_lakes.timeout = 60.0 - default_config.rpcs.list_lakes.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_lake.timeout = 60.0 - default_config.rpcs.get_lake.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_lake_actions.timeout = 60.0 - default_config.rpcs.list_lake_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_zone.timeout = 60.0 - - default_config.rpcs.update_zone.timeout = 60.0 - - default_config.rpcs.delete_zone.timeout = 60.0 - - default_config.rpcs.list_zones.timeout = 60.0 - default_config.rpcs.list_zones.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_zone.timeout = 60.0 - default_config.rpcs.get_zone.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_zone_actions.timeout = 60.0 - default_config.rpcs.list_zone_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_asset.timeout = 60.0 - - default_config.rpcs.update_asset.timeout = 60.0 - - default_config.rpcs.delete_asset.timeout = 60.0 - - default_config.rpcs.list_assets.timeout = 60.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_asset.timeout = 60.0 - default_config.rpcs.get_asset.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_asset_actions.timeout = 60.0 - default_config.rpcs.list_asset_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_task.timeout = 60.0 - - default_config.rpcs.update_task.timeout = 60.0 - - default_config.rpcs.delete_task.timeout = 60.0 - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_jobs.timeout = 60.0 - default_config.rpcs.list_jobs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_job.timeout = 60.0 - default_config.rpcs.get_job.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.cancel_job.timeout = 60.0 - - default_config.rpcs.create_environment.timeout = 60.0 - - default_config.rpcs.update_environment.timeout = 60.0 - - default_config.rpcs.delete_environment.timeout = 60.0 - - default_config.rpcs.list_environments.timeout = 60.0 - default_config.rpcs.list_environments.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_environment.timeout = 60.0 - default_config.rpcs.get_environment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataplexService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @dataplex_service_stub.universe_domain - end - - ## - # Create a new DataplexService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataplexService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @dataplex_service_stub = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataplex_service_stub.endpoint - config.universe_domain = @dataplex_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataplex_service_stub.endpoint - config.universe_domain = @dataplex_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataplexService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Creates a lake resource. - # - # @overload create_lake(request, options = nil) - # Pass arguments to `create_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil) - # Pass arguments to `create_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 lake_id [::String] - # 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 lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] - # Required. Lake resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new - # - # # Call the create_lake method. - # result = client.create_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_lake.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.create_lake request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a lake resource. - # - # @overload update_lake(request, options = nil) - # Pass arguments to `update_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_lake(update_mask: nil, lake: nil, validate_only: nil) - # Pass arguments to `update_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new - # - # # Call the update_lake method. - # result = client.update_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_lake.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.update_lake request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a lake resource. All zones within the lake must be deleted before - # the lake can be deleted. - # - # @overload delete_lake(request, options = nil) - # Pass arguments to `delete_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_lake(name: nil) - # Pass arguments to `delete_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new - # - # # Call the delete_lake method. - # result = client.delete_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_lake.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.delete_lake request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists lake resources in a project and location. - # - # @overload list_lakes(request, options = nil) - # Pass arguments to `list_lakes` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListLakesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lakes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListLakesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListLakesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListLakesRequest.new - # - # # Call the list_lakes method. - # result = client.list_lakes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. - # p item - # end - # - def list_lakes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_lakes.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_lakes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lakes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_lakes request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a lake resource. - # - # @overload get_lake(request, options = nil) - # Pass arguments to `get_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_lake(name: nil) - # Pass arguments to `get_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Lake] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Lake] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetLakeRequest.new - # - # # Call the get_lake method. - # result = client.get_lake request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Lake. - # p result - # - def get_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_lake.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_lake request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in a lake. - # - # @overload list_lake_actions(request, options = nil) - # Pass arguments to `list_lake_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListLakeActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_lake_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_lake_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new - # - # # Call the list_lake_actions method. - # result = client.list_lake_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_lake_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_lake_actions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_lake_actions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lake_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_lake_actions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, "actions", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a zone resource within a lake. - # - # @overload create_zone(request, options = nil) - # Pass arguments to `create_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil) - # Pass arguments to `create_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param zone_id [::String] - # 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 zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] - # Required. Zone resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new - # - # # Call the create_zone method. - # result = client.create_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_zone.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.create_zone request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a zone resource. - # - # @overload update_zone(request, options = nil) - # Pass arguments to `update_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_zone(update_mask: nil, zone: nil, validate_only: nil) - # Pass arguments to `update_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new - # - # # Call the update_zone method. - # result = client.update_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_zone.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.update_zone request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a zone resource. All assets within a zone must be deleted before - # the zone can be deleted. - # - # @overload delete_zone(request, options = nil) - # Pass arguments to `delete_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_zone(name: nil) - # Pass arguments to `delete_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new - # - # # Call the delete_zone method. - # result = client.delete_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_zone.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.delete_zone request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists zone resources in a lake. - # - # @overload list_zones(request, options = nil) - # Pass arguments to `list_zones` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListZonesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_zones` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListZonesRequest.new - # - # # Call the list_zones method. - # result = client.list_zones request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. - # p item - # end - # - def list_zones request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZonesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_zones.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_zones.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_zones.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_zones request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zones, "zones", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a zone resource. - # - # @overload get_zone(request, options = nil) - # Pass arguments to `get_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_zone(name: nil) - # Pass arguments to `get_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Zone] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Zone] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetZoneRequest.new - # - # # Call the get_zone method. - # result = client.get_zone request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Zone. - # p result - # - def get_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_zone.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_zone request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in a zone. - # - # @overload list_zone_actions(request, options = nil) - # Pass arguments to `list_zone_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListZoneActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_zone_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_zone_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new - # - # # Call the list_zone_actions method. - # result = client.list_zone_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_zone_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_zone_actions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_zone_actions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_zone_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_zone_actions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, "actions", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an asset resource. - # - # @overload create_asset(request, options = nil) - # Pass arguments to `create_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil) - # Pass arguments to `create_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param asset_id [::String] - # 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 asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] - # Required. Asset resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new - # - # # Call the create_asset method. - # result = client.create_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.create_asset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an asset resource. - # - # @overload update_asset(request, options = nil) - # Pass arguments to `update_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_asset(update_mask: nil, asset: nil, validate_only: nil) - # Pass arguments to `update_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new - # - # # Call the update_asset method. - # result = client.update_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.update_asset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an asset resource. The referenced storage resource is detached - # (default) or deleted based on the associated Lifecycle policy. - # - # @overload delete_asset(request, options = nil) - # Pass arguments to `delete_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_asset(name: nil) - # Pass arguments to `delete_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new - # - # # Call the delete_asset method. - # result = client.delete_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.delete_asset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists asset resources in a zone. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_assets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_assets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_assets, "assets", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves an asset resource. - # - # @overload get_asset(request, options = nil) - # Pass arguments to `get_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_asset(name: nil) - # Pass arguments to `get_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Asset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Asset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetAssetRequest.new - # - # # Call the get_asset method. - # result = client.get_asset request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Asset. - # p result - # - def get_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_asset request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in an asset. - # - # @overload list_asset_actions(request, options = nil) - # Pass arguments to `list_asset_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAssetActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_asset_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_asset_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new - # - # # Call the list_asset_actions method. - # result = client.list_asset_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_asset_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_asset_actions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_asset_actions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_asset_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_asset_actions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, "actions", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a task resource within a lake. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_task(parent: nil, task_id: nil, task: nil, validate_only: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param task_id [::String] - # Required. Task identifier. - # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] - # Required. Task resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.create_task request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the task resource. - # - # @overload update_task(request, options = nil) - # Pass arguments to `update_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_task(update_mask: nil, task: nil, validate_only: nil) - # Pass arguments to `update_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new - # - # # Call the update_task method. - # result = client.update_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.update_task request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete the task resource. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_task(name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.delete_task request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists tasks under the given lake. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListTasksResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_tasks request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get task resource. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_task(name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_task request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Jobs under the given task. - # - # @overload list_jobs(request, options = nil) - # Pass arguments to `list_jobs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_jobs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListJobsRequest.new - # - # # Call the list_jobs method. - # result = client.list_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Job. - # p item - # end - # - def list_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_jobs.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_jobs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_jobs, "jobs", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Run an on demand execution of a Task. - # - # @overload run_task(request, options = nil) - # Pass arguments to `run_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::RunTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_task(name: nil, labels: nil, args: nil) - # Pass arguments to `run_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @param labels [::Hash{::String => ::String}] - # 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 args [::Hash{::String => ::String}] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::RunTaskRequest.new - # - # # Call the run_task method. - # result = client.run_task request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. - # p result - # - def run_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.run_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.run_task request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get job resource. - # - # @overload get_job(request, options = nil) - # Pass arguments to `get_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_job(name: nil) - # Pass arguments to `get_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Job] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetJobRequest.new - # - # # Call the get_job method. - # result = client.get_job request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Job. - # p result - # - def get_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_job.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_job request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancel jobs running for the task resource. - # - # @overload cancel_job(request, options = nil) - # Pass arguments to `cancel_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CancelJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_job(name: nil) - # Pass arguments to `cancel_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CancelJobRequest.new - # - # # Call the cancel_job method. - # result = client.cancel_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_job.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.cancel_job request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create an environment resource. - # - # @overload create_environment(request, options = nil) - # Pass arguments to `create_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_environment(parent: nil, environment_id: nil, environment: nil, validate_only: nil) - # Pass arguments to `create_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - # @param environment_id [::String] - # 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 environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] - # Required. Environment resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new - # - # # Call the create_environment method. - # result = client.create_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_environment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.create_environment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the environment resource. - # - # @overload update_environment(request, options = nil) - # Pass arguments to `update_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_environment(update_mask: nil, environment: nil, validate_only: nil) - # Pass arguments to `update_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new - # - # # Call the update_environment method. - # result = client.update_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_environment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.update_environment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete the environment resource. All the child resources must have been - # deleted before environment deletion can be initiated. - # - # @overload delete_environment(request, options = nil) - # Pass arguments to `delete_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_environment(name: nil) - # Pass arguments to `delete_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the environment: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new - # - # # Call the delete_environment method. - # result = client.delete_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_environment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.delete_environment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists environments under the given lake. - # - # @overload list_environments(request, options = nil) - # Pass arguments to `list_environments` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_environments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_environments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new - # - # # Call the list_environments method. - # result = client.list_environments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Environment. - # p item - # end - # - def list_environments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_environments.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_environments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_environments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_environments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_environments, "environments", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get environment resource. - # - # @overload get_environment(request, options = nil) - # Pass arguments to `get_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_environment(name: nil) - # Pass arguments to `get_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the environment: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Environment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Environment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new - # - # # Call the get_environment method. - # result = client.get_environment request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Environment. - # p result - # - def get_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_environment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_environment request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists session resources in an environment. - # - # @overload list_sessions(request, options = nil) - # Pass arguments to `list_sessions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListSessionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListSessionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_sessions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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 - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new - # - # # Call the list_sessions method. - # result = client.list_sessions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Session. - # p item - # end - # - def list_sessions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListSessionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_sessions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_sessions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_sessions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_sessions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_sessions, "sessions", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataplexService REST API. - # - # This class represents the configuration for DataplexService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_lake to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_lake.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_lake.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the DataplexService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lake - ## - # RPC-specific configuration for `update_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lake - ## - # RPC-specific configuration for `delete_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lake - ## - # RPC-specific configuration for `list_lakes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lakes - ## - # RPC-specific configuration for `get_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lake - ## - # RPC-specific configuration for `list_lake_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lake_actions - ## - # RPC-specific configuration for `create_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :create_zone - ## - # RPC-specific configuration for `update_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :update_zone - ## - # RPC-specific configuration for `delete_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_zone - ## - # RPC-specific configuration for `list_zones` - # @return [::Gapic::Config::Method] - # - attr_reader :list_zones - ## - # RPC-specific configuration for `get_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :get_zone - ## - # RPC-specific configuration for `list_zone_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_zone_actions - ## - # RPC-specific configuration for `create_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_asset - ## - # RPC-specific configuration for `update_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_asset - ## - # RPC-specific configuration for `delete_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_asset - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `get_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_asset - ## - # RPC-specific configuration for `list_asset_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_asset_actions - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `update_task` - # @return [::Gapic::Config::Method] - # - attr_reader :update_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `list_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_jobs - ## - # RPC-specific configuration for `run_task` - # @return [::Gapic::Config::Method] - # - attr_reader :run_task - ## - # RPC-specific configuration for `get_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job - ## - # RPC-specific configuration for `cancel_job` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_job - ## - # RPC-specific configuration for `create_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_environment - ## - # RPC-specific configuration for `update_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_environment - ## - # RPC-specific configuration for `delete_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_environment - ## - # RPC-specific configuration for `list_environments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_environments - ## - # RPC-specific configuration for `get_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_environment - ## - # RPC-specific configuration for `list_sessions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sessions - - # @private - def initialize parent_rpcs = nil - create_lake_config = parent_rpcs.create_lake if parent_rpcs.respond_to? :create_lake - @create_lake = ::Gapic::Config::Method.new create_lake_config - update_lake_config = parent_rpcs.update_lake if parent_rpcs.respond_to? :update_lake - @update_lake = ::Gapic::Config::Method.new update_lake_config - delete_lake_config = parent_rpcs.delete_lake if parent_rpcs.respond_to? :delete_lake - @delete_lake = ::Gapic::Config::Method.new delete_lake_config - list_lakes_config = parent_rpcs.list_lakes if parent_rpcs.respond_to? :list_lakes - @list_lakes = ::Gapic::Config::Method.new list_lakes_config - get_lake_config = parent_rpcs.get_lake if parent_rpcs.respond_to? :get_lake - @get_lake = ::Gapic::Config::Method.new get_lake_config - list_lake_actions_config = parent_rpcs.list_lake_actions if parent_rpcs.respond_to? :list_lake_actions - @list_lake_actions = ::Gapic::Config::Method.new list_lake_actions_config - create_zone_config = parent_rpcs.create_zone if parent_rpcs.respond_to? :create_zone - @create_zone = ::Gapic::Config::Method.new create_zone_config - update_zone_config = parent_rpcs.update_zone if parent_rpcs.respond_to? :update_zone - @update_zone = ::Gapic::Config::Method.new update_zone_config - delete_zone_config = parent_rpcs.delete_zone if parent_rpcs.respond_to? :delete_zone - @delete_zone = ::Gapic::Config::Method.new delete_zone_config - list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones - @list_zones = ::Gapic::Config::Method.new list_zones_config - get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone - @get_zone = ::Gapic::Config::Method.new get_zone_config - list_zone_actions_config = parent_rpcs.list_zone_actions if parent_rpcs.respond_to? :list_zone_actions - @list_zone_actions = ::Gapic::Config::Method.new list_zone_actions_config - create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset - @create_asset = ::Gapic::Config::Method.new create_asset_config - update_asset_config = parent_rpcs.update_asset if parent_rpcs.respond_to? :update_asset - @update_asset = ::Gapic::Config::Method.new update_asset_config - delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset - @delete_asset = ::Gapic::Config::Method.new delete_asset_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset - @get_asset = ::Gapic::Config::Method.new get_asset_config - list_asset_actions_config = parent_rpcs.list_asset_actions if parent_rpcs.respond_to? :list_asset_actions - @list_asset_actions = ::Gapic::Config::Method.new list_asset_actions_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task - @update_task = ::Gapic::Config::Method.new update_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs - @list_jobs = ::Gapic::Config::Method.new list_jobs_config - run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task - @run_task = ::Gapic::Config::Method.new run_task_config - get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job - @get_job = ::Gapic::Config::Method.new get_job_config - cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job - @cancel_job = ::Gapic::Config::Method.new cancel_job_config - create_environment_config = parent_rpcs.create_environment if parent_rpcs.respond_to? :create_environment - @create_environment = ::Gapic::Config::Method.new create_environment_config - update_environment_config = parent_rpcs.update_environment if parent_rpcs.respond_to? :update_environment - @update_environment = ::Gapic::Config::Method.new update_environment_config - delete_environment_config = parent_rpcs.delete_environment if parent_rpcs.respond_to? :delete_environment - @delete_environment = ::Gapic::Config::Method.new delete_environment_config - list_environments_config = parent_rpcs.list_environments if parent_rpcs.respond_to? :list_environments - @list_environments = ::Gapic::Config::Method.new list_environments_config - get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment - @get_environment = ::Gapic::Config::Method.new get_environment_config - list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions - @list_sessions = ::Gapic::Config::Method.new list_sessions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb deleted file mode 100644 index 0dec2450e6f8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb +++ /dev/null @@ -1,895 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DataplexService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataplexService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb deleted file mode 100644 index 8a828884a451..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb +++ /dev/null @@ -1,2028 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/service_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - module Rest - ## - # REST service stub for the DataplexService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the create_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateLakeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_lake request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_lake_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateLakeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_lake request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_lake_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteLakeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_lake request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_lake_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_lakes REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListLakesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListLakesResponse] - # A result object deserialized from the server's reply - def list_lakes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lakes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListLakesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetLakeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Lake] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Lake] - # A result object deserialized from the server's reply - def get_lake request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lake_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Lake.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_lake_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # A result object deserialized from the server's reply - def list_lake_actions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lake_actions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateZoneRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_zone request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_zone_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateZoneRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_zone request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_zone_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteZoneRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_zone request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_zone_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_zones REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListZonesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListZonesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListZonesResponse] - # A result object deserialized from the server's reply - def list_zones request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_zones_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListZonesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetZoneRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Zone] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Zone] - # A result object deserialized from the server's reply - def get_zone request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_zone_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Zone.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_zone_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # A result object deserialized from the server's reply - def list_zone_actions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_zone_actions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_assets REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAssetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListAssetsResponse] - # A result object deserialized from the server's reply - def list_assets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Asset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Asset] - # A result object deserialized from the server's reply - def get_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Asset.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_asset_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # A result object deserialized from the server's reply - def list_asset_actions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_asset_actions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_tasks REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListTasksResponse] - # A result object deserialized from the server's reply - def list_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Task] - # A result object deserialized from the server's reply - def get_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Task.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_jobs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListJobsResponse] - # A result object deserialized from the server's reply - def list_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the run_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::RunTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # A result object deserialized from the server's reply - def run_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::RunTaskResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Job] - # A result object deserialized from the server's reply - def get_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Job.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the cancel_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CancelJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_cancel_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_environment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_environment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_environment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_environment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_environment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_environment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_environments REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse] - # A result object deserialized from the server's reply - def list_environments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_environments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Environment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Environment] - # A result object deserialized from the server's reply - def get_environment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_environment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Environment.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_sessions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListSessionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListSessionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListSessionsResponse] - # A result object deserialized from the server's reply - def list_sessions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_sessions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListSessionsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the create_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateLakeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_lake_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/lakes", - body: "lake", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateLakeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_lake_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{lake.name}", - body: "lake", - matches: [ - ["lake.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteLakeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_lake_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_lakes REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_lakes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/lakes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetLakeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_lake_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_lake_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_lake_actions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/actions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateZoneRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_zone_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/zones", - body: "zone", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateZoneRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_zone_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{zone.name}", - body: "zone", - matches: [ - ["zone.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteZoneRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_zone_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_zones REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListZonesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_zones_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/zones", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetZoneRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_zone_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_zone_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_zone_actions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/actions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/assets", - body: "asset", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{asset.name}", - body: "asset", - matches: [ - ["asset.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_assets REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_assets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/assets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_asset_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_asset_actions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/actions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tasks", - body: "task", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{task.name}", - body: "task", - matches: [ - ["task.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tasks REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/tasks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_jobs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListJobsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/jobs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::RunTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:run", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CancelJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_environment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/environments", - body: "environment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_environment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{environment.name}", - body: "environment", - matches: [ - ["environment.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_environment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_environments REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_environments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/environments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_environment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sessions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListSessionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_sessions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/sessions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb deleted file mode 100644 index 36b7d41e7d77..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb +++ /dev/null @@ -1,81 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/datascans.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/data_profile_pb' -require 'google/cloud/dataplex/v1/data_quality_pb' -require 'google/cloud/dataplex/v1/processing_pb' -require 'google/cloud/dataplex/v1/resources_pb' -require 'google/cloud/dataplex/v1/service_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n(google/cloud/dataplex/v1/datascans.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/dataplex/v1/data_profile.proto\x1a+google/cloud/dataplex/v1/data_quality.proto\x1a)google/cloud/dataplex/v1/processing.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc5\x01\n\x15\x43reateDataScanRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\tdata_scan\x18\x02 \x01(\x0b\x32\".google.cloud.dataplex.v1.DataScanB\x03\xe0\x41\x02\x12\x19\n\x0c\x64\x61ta_scan_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa5\x01\n\x15UpdateDataScanRequest\x12:\n\tdata_scan\x18\x01 \x01(\x0b\x32\".google.cloud.dataplex.v1.DataScanB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x15\x44\x65leteDataScanRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\"\xdf\x01\n\x12GetDataScanRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\x12L\n\x04view\x18\x02 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.GetDataScanRequest.DataScanViewB\x03\xe0\x41\x01\"C\n\x0c\x44\x61taScanView\x12\x1e\n\x1a\x44\x41TA_SCAN_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\n\"\xae\x01\n\x14ListDataScansRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"}\n\x15ListDataScansResponse\x12\x36\n\ndata_scans\x18\x01 \x03(\x0b\x32\".google.cloud.dataplex.v1.DataScan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"L\n\x12RunDataScanRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\"I\n\x13RunDataScanResponse\x12\x32\n\x03job\x18\x01 \x01(\x0b\x32%.google.cloud.dataplex.v1.DataScanJob\"\xf2\x01\n\x15GetDataScanJobRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/DataScanJob\x12R\n\x04view\x18\x02 \x01(\x0e\x32?.google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobViewB\x03\xe0\x41\x01\"J\n\x0f\x44\x61taScanJobView\x12\"\n\x1e\x44\x41TA_SCAN_JOB_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\n\"\x99\x01\n\x17ListDataScanJobsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"r\n\x18ListDataScanJobsResponse\x12=\n\x0e\x64\x61ta_scan_jobs\x18\x01 \x03(\x0b\x32%.google.cloud.dataplex.v1.DataScanJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"4\n\x1fGenerateDataQualityRulesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"[\n GenerateDataQualityRulesResponse\x12\x37\n\x04rule\x18\x01 \x03(\x0b\x32).google.cloud.dataplex.v1.DataQualityRule\"\xb1\n\n\x08\x44\x61taScan\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x06labels\x18\x05 \x03(\x0b\x32..google.cloud.dataplex.v1.DataScan.LabelsEntryB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x06 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x04\x64\x61ta\x18\t \x01(\x0b\x32$.google.cloud.dataplex.v1.DataSourceB\x03\xe0\x41\x02\x12M\n\x0e\x65xecution_spec\x18\n \x01(\x0b\x32\x30.google.cloud.dataplex.v1.DataScan.ExecutionSpecB\x03\xe0\x41\x01\x12Q\n\x10\x65xecution_status\x18\x0b \x01(\x0b\x32\x32.google.cloud.dataplex.v1.DataScan.ExecutionStatusB\x03\xe0\x41\x03\x12\x39\n\x04type\x18\x0c \x01(\x0e\x32&.google.cloud.dataplex.v1.DataScanTypeB\x03\xe0\x41\x03\x12\x46\n\x11\x64\x61ta_quality_spec\x18\x64 \x01(\x0b\x32).google.cloud.dataplex.v1.DataQualitySpecH\x00\x12\x46\n\x11\x64\x61ta_profile_spec\x18\x65 \x01(\x0b\x32).google.cloud.dataplex.v1.DataProfileSpecH\x00\x12P\n\x13\x64\x61ta_quality_result\x18\xc8\x01 \x01(\x0b\x32+.google.cloud.dataplex.v1.DataQualityResultB\x03\xe0\x41\x03H\x01\x12P\n\x13\x64\x61ta_profile_result\x18\xc9\x01 \x01(\x0b\x32+.google.cloud.dataplex.v1.DataProfileResultB\x03\xe0\x41\x03H\x01\x1am\n\rExecutionSpec\x12\x37\n\x07trigger\x18\x01 \x01(\x0b\x32!.google.cloud.dataplex.v1.TriggerB\x03\xe0\x41\x01\x12\x14\n\x05\x66ield\x18\x64 \x01(\tB\x03\xe0\x41\x05H\x00\x42\r\n\x0bincremental\x1a\x85\x01\n\x0f\x45xecutionStatus\x12\x39\n\x15latest_job_start_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13latest_job_end_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:c\xea\x41`\n dataplex.googleapis.com/DataScan\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/dataScans\x12\xaf\x01\n\x0bRunDataScan\x12,.google.cloud.dataplex.v1.RunDataScanRequest\x1a-.google.cloud.dataplex.v1.RunDataScanResponse\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/dataScans/*}:run:\x01*\x12\xad\x01\n\x0eGetDataScanJob\x12/.google.cloud.dataplex.v1.GetDataScanJobRequest\x1a%.google.cloud.dataplex.v1.DataScanJob\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}\x12\xc0\x01\n\x10ListDataScanJobs\x12\x31.google.cloud.dataplex.v1.ListDataScanJobsRequest\x1a\x32.google.cloud.dataplex.v1.ListDataScanJobsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*/dataScans/*}/jobs\x12\xc1\x02\n\x18GenerateDataQualityRules\x12\x39.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest\x1a:.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse\"\xad\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x9f\x01\"F/v1/{name=projects/*/locations/*/dataScans/*}:generateDataQualityRules:\x01*ZR\"M/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}:generateDataQualityRules:\x01*\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBj\n\x1c\x63om.google.cloud.dataplex.v1B\x0e\x44\x61taScansProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ["google.cloud.dataplex.v1.DataQualityRule", "google/cloud/dataplex/v1/data_quality.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.dataplex.v1.DataSource", "google/cloud/dataplex/v1/processing.proto"], - ["google.cloud.dataplex.v1.DataProfileSpec", "google/cloud/dataplex/v1/data_profile.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - CreateDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataScanRequest").msgclass - UpdateDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataScanRequest").msgclass - DeleteDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataScanRequest").msgclass - GetDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanRequest").msgclass - GetDataScanRequest::DataScanView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanRequest.DataScanView").enummodule - ListDataScansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScansRequest").msgclass - ListDataScansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScansResponse").msgclass - RunDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunDataScanRequest").msgclass - RunDataScanResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunDataScanResponse").msgclass - GetDataScanJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanJobRequest").msgclass - GetDataScanJobRequest::DataScanJobView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView").enummodule - ListDataScanJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScanJobsRequest").msgclass - ListDataScanJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScanJobsResponse").msgclass - GenerateDataQualityRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GenerateDataQualityRulesRequest").msgclass - GenerateDataQualityRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GenerateDataQualityRulesResponse").msgclass - DataScan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan").msgclass - DataScan::ExecutionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan.ExecutionSpec").msgclass - DataScan::ExecutionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan.ExecutionStatus").msgclass - DataScanJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanJob").msgclass - DataScanJob::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanJob.State").enummodule - DataScanType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb deleted file mode 100644 index bba1ee3c3dee..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb +++ /dev/null @@ -1,63 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/datascans.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# - -require 'grpc' -require 'google/cloud/dataplex/v1/datascans_pb' - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - # 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 Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.DataScanService' - - # Creates a DataScan resource. - rpc :CreateDataScan, ::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Google::Longrunning::Operation - # Updates a DataScan resource. - rpc :UpdateDataScan, ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Google::Longrunning::Operation - # Deletes a DataScan resource. - rpc :DeleteDataScan, ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Google::Longrunning::Operation - # Gets a DataScan resource. - rpc :GetDataScan, ::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Google::Cloud::Dataplex::V1::DataScan - # Lists DataScans. - rpc :ListDataScans, ::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Google::Cloud::Dataplex::V1::ListDataScansResponse - # Runs an on-demand execution of a DataScan - rpc :RunDataScan, ::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Google::Cloud::Dataplex::V1::RunDataScanResponse - # Gets a DataScanJob resource. - rpc :GetDataScanJob, ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Google::Cloud::Dataplex::V1::DataScanJob - # Lists DataScanJobs under the given DataScan. - rpc :ListDataScanJobs, ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse - # Generates recommended DataQualityRule from a data profiling DataScan. - rpc :GenerateDataQualityRules, ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb deleted file mode 100644 index 358f748a0eaa..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb +++ /dev/null @@ -1,84 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/logs.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n#google/cloud/dataplex/v1/logs.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\t\n\x0e\x44iscoveryEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07lake_id\x18\x02 \x01(\t\x12\x0f\n\x07zone_id\x18\x03 \x01(\t\x12\x10\n\x08\x61sset_id\x18\x04 \x01(\t\x12\x15\n\rdata_location\x18\x05 \x01(\t\x12@\n\x04type\x18\n \x01(\x0e\x32\x32.google.cloud.dataplex.v1.DiscoveryEvent.EventType\x12H\n\x06\x63onfig\x18\x14 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetailsH\x00\x12H\n\x06\x65ntity\x18\x15 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetailsH\x00\x12N\n\tpartition\x18\x16 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetailsH\x00\x12H\n\x06\x61\x63tion\x18\x17 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetailsH\x00\x1a\x9e\x01\n\rConfigDetails\x12Z\n\nparameters\x18\x01 \x03(\x0b\x32\x46.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.ParametersEntry\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x62\n\rEntityDetails\x12\x0e\n\x06\x65ntity\x18\x01 \x01(\t\x12\x41\n\x04type\x18\x02 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.DiscoveryEvent.EntityType\x1a\x98\x01\n\x10PartitionDetails\x12\x11\n\tpartition\x18\x01 \x01(\t\x12\x0e\n\x06\x65ntity\x18\x02 \x01(\t\x12\x41\n\x04type\x18\x03 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.DiscoveryEvent.EntityType\x12\x1e\n\x16sampled_data_locations\x18\x04 \x03(\t\x1a\x1d\n\rActionDetails\x12\x0c\n\x04type\x18\x01 \x01(\t\"\xb4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43ONFIG\x10\x01\x12\x12\n\x0e\x45NTITY_CREATED\x10\x02\x12\x12\n\x0e\x45NTITY_UPDATED\x10\x03\x12\x12\n\x0e\x45NTITY_DELETED\x10\x04\x12\x15\n\x11PARTITION_CREATED\x10\x05\x12\x15\n\x11PARTITION_UPDATED\x10\x06\x12\x15\n\x11PARTITION_DELETED\x10\x07\"A\n\nEntityType\x12\x1b\n\x17\x45NTITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02\x42\t\n\x07\x64\x65tails\"\xc5\x05\n\x08JobEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x05state\x18\x05 \x01(\x0e\x32(.google.cloud.dataplex.v1.JobEvent.State\x12\x0f\n\x07retries\x18\x06 \x01(\x05\x12\x35\n\x04type\x18\x07 \x01(\x0e\x32\'.google.cloud.dataplex.v1.JobEvent.Type\x12;\n\x07service\x18\x08 \x01(\x0e\x32*.google.cloud.dataplex.v1.JobEvent.Service\x12\x13\n\x0bservice_job\x18\t \x01(\t\x12N\n\x11\x65xecution_trigger\x18\x0b \x01(\x0e\x32\x33.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SPARK\x10\x01\x12\x0c\n\x08NOTEBOOK\x10\x02\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\x0b\n\x07\x41\x42ORTED\x10\x04\"0\n\x07Service\x12\x17\n\x13SERVICE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TAPROC\x10\x01\"W\n\x10\x45xecutionTrigger\x12!\n\x1d\x45XECUTION_TRIGGER_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTASK_CONFIG\x10\x01\x12\x0f\n\x0bRUN_REQUEST\x10\x02\"\xbd\x05\n\x0cSessionEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07user_id\x18\x02 \x01(\t\x12\x12\n\nsession_id\x18\x03 \x01(\t\x12>\n\x04type\x18\x04 \x01(\x0e\x32\x30.google.cloud.dataplex.v1.SessionEvent.EventType\x12\x43\n\x05query\x18\x05 \x01(\x0b\x32\x32.google.cloud.dataplex.v1.SessionEvent.QueryDetailH\x00\x12\x17\n\x0f\x65vent_succeeded\x18\x06 \x01(\x08\x12\x1c\n\x14\x66\x61st_startup_enabled\x18\x07 \x01(\x08\x12\x36\n\x13unassigned_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\xa3\x02\n\x0bQueryDetail\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12\x12\n\nquery_text\x18\x02 \x01(\t\x12I\n\x06\x65ngine\x18\x03 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine\x12+\n\x08\x64uration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x19\n\x11result_size_bytes\x18\x05 \x01(\x03\x12\x1c\n\x14\x64\x61ta_processed_bytes\x18\x06 \x01(\x03\"=\n\x06\x45ngine\x12\x16\n\x12\x45NGINE_UNSPECIFIED\x10\x00\x12\r\n\tSPARK_SQL\x10\x01\x12\x0c\n\x08\x42IGQUERY\x10\x02\"S\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05START\x10\x01\x12\x08\n\x04STOP\x10\x02\x12\t\n\x05QUERY\x10\x03\x12\n\n\x06\x43REATE\x10\x04\x42\x08\n\x06\x64\x65tail\"\xba\x07\n\x0fGovernanceEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12G\n\nevent_type\x18\x02 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.GovernanceEvent.EventType\x12\x45\n\x06\x65ntity\x18\x03 \x01(\x0b\x32\x30.google.cloud.dataplex.v1.GovernanceEvent.EntityH\x00\x88\x01\x01\x1a\xd2\x01\n\x06\x45ntity\x12\x33\n\x06\x65ntity\x18\x01 \x01(\tB#\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12P\n\x0b\x65ntity_type\x18\x02 \x01(\x0e\x32;.google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType\"A\n\nEntityType\x12\x1b\n\x17\x45NTITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02\"\xa5\x04\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aRESOURCE_IAM_POLICY_UPDATE\x10\x01\x12\x19\n\x15\x42IGQUERY_TABLE_CREATE\x10\x02\x12\x19\n\x15\x42IGQUERY_TABLE_UPDATE\x10\x03\x12\x19\n\x15\x42IGQUERY_TABLE_DELETE\x10\x04\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_CREATE\x10\x05\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_UPDATE\x10\x06\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_DELETE\x10\x07\x12\x1c\n\x18\x42IGQUERY_TAXONOMY_CREATE\x10\n\x12\x1e\n\x1a\x42IGQUERY_POLICY_TAG_CREATE\x10\x0b\x12\x1e\n\x1a\x42IGQUERY_POLICY_TAG_DELETE\x10\x0c\x12&\n\"BIGQUERY_POLICY_TAG_SET_IAM_POLICY\x10\r\x12\x18\n\x14\x41\x43\x43\x45SS_POLICY_UPDATE\x10\x0e\x12%\n!GOVERNANCE_RULE_MATCHED_RESOURCES\x10\x0f\x12(\n$GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS\x10\x10\x12\x1a\n\x16GOVERNANCE_RULE_ERRORS\x10\x11\x12\x1e\n\x1aGOVERNANCE_RULE_PROCESSING\x10\x12\x42\t\n\x07_entity\"\xf3\x12\n\rDataScanEvent\x12\x13\n\x0b\x64\x61ta_source\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x04type\x18\x05 \x01(\x0e\x32\x30.google.cloud.dataplex.v1.DataScanEvent.ScanType\x12<\n\x05state\x18\x06 \x01(\x0e\x32-.google.cloud.dataplex.v1.DataScanEvent.State\x12\x0f\n\x07message\x18\x07 \x01(\t\x12\x14\n\x0cspec_version\x18\x08 \x01(\t\x12@\n\x07trigger\x18\t \x01(\x0e\x32/.google.cloud.dataplex.v1.DataScanEvent.Trigger\x12<\n\x05scope\x18\n \x01(\x0e\x32-.google.cloud.dataplex.v1.DataScanEvent.Scope\x12Q\n\x0c\x64\x61ta_profile\x18\x65 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultH\x00\x12Q\n\x0c\x64\x61ta_quality\x18\x66 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultH\x00\x12\x62\n\x14\x64\x61ta_profile_configs\x18\xc9\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigsH\x01\x12\x62\n\x14\x64\x61ta_quality_configs\x18\xca\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigsH\x01\x12_\n\x18post_scan_actions_result\x18\x0b \x01(\x0b\x32=.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult\x1a&\n\x11\x44\x61taProfileResult\x12\x11\n\trow_count\x18\x01 \x01(\x03\x1a\x9c\x04\n\x11\x44\x61taQualityResult\x12\x11\n\trow_count\x18\x01 \x01(\x03\x12\x0e\n\x06passed\x18\x02 \x01(\x08\x12h\n\x10\x64imension_passed\x18\x03 \x03(\x0b\x32N.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.DimensionPassedEntry\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x66\n\x0f\x64imension_score\x18\x05 \x03(\x0b\x32M.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.DimensionScoreEntry\x12`\n\x0c\x63olumn_score\x18\x06 \x03(\x0b\x32J.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.ColumnScoreEntry\x1a\x36\n\x14\x44imensionPassedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\x35\n\x13\x44imensionScoreEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1a\x32\n\x10\x43olumnScoreEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1ap\n\x19\x44\x61taProfileAppliedConfigs\x12\x18\n\x10sampling_percent\x18\x01 \x01(\x02\x12\x1a\n\x12row_filter_applied\x18\x02 \x01(\x08\x12\x1d\n\x15\x63olumn_filter_applied\x18\x03 \x01(\x08\x1aQ\n\x19\x44\x61taQualityAppliedConfigs\x12\x18\n\x10sampling_percent\x18\x01 \x01(\x02\x12\x1a\n\x12row_filter_applied\x18\x02 \x01(\x08\x1a\xe6\x02\n\x15PostScanActionsResult\x12r\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32R.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult\x1a\xd8\x01\n\x14\x42igQueryExportResult\x12g\n\x05state\x18\x01 \x01(\x0e\x32X.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State\x12\x0f\n\x07message\x18\x02 \x01(\t\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\"I\n\x08ScanType\x12\x19\n\x15SCAN_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_PROFILE\x10\x01\x12\x10\n\x0c\x44\x41TA_QUALITY\x10\x02\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x12\x0b\n\x07\x43REATED\x10\x05\"?\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\x0c\n\x08SCHEDULE\x10\x02\"9\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\x0f\n\x0bINCREMENTAL\x10\x02\x42\x08\n\x06resultB\x10\n\x0e\x61ppliedConfigs\"\x99\x07\n\x19\x44\x61taQualityScanRuleResult\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x61ta_source\x18\x02 \x01(\t\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\t\x12\x11\n\trule_name\x18\x04 \x01(\t\x12O\n\trule_type\x18\x05 \x01(\x0e\x32<.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType\x12Z\n\x0e\x65valution_type\x18\x06 \x01(\x0e\x32\x42.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType\x12\x16\n\x0erule_dimension\x18\x07 \x01(\t\x12\x19\n\x11threshold_percent\x18\x08 \x01(\x01\x12J\n\x06result\x18\t \x01(\x0e\x32:.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result\x12\x1b\n\x13\x65valuated_row_count\x18\n \x01(\x03\x12\x18\n\x10passed_row_count\x18\x0b \x01(\x03\x12\x16\n\x0enull_row_count\x18\x0c \x01(\x03\x12\x1b\n\x13\x61ssertion_row_count\x18\r \x01(\x03\"\x92\x02\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14NON_NULL_EXPECTATION\x10\x01\x12\x15\n\x11RANGE_EXPECTATION\x10\x02\x12\x15\n\x11REGEX_EXPECTATION\x10\x03\x12\x1d\n\x19ROW_CONDITION_EXPECTATION\x10\x04\x12\x13\n\x0fSET_EXPECTATION\x10\x05\x12\x1f\n\x1bSTATISTIC_RANGE_EXPECTATION\x10\x06\x12\x1f\n\x1bTABLE_CONDITION_EXPECTATION\x10\x07\x12\x1a\n\x16UNIQUENESS_EXPECTATION\x10\x08\x12\x11\n\rSQL_ASSERTION\x10\t\"M\n\x0e\x45valuationType\x12\x1f\n\x1b\x45VALUATION_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PER_ROW\x10\x01\x12\r\n\tAGGREGATE\x10\x02\"8\n\x06Result\x12\x16\n\x12RESULT_UNSPECIFIED\x10\x00\x12\n\n\x06PASSED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x42\x65\n\x1c\x63om.google.cloud.dataplex.v1B\tLogsProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - DiscoveryEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent").msgclass - DiscoveryEvent::ConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails").msgclass - DiscoveryEvent::EntityDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails").msgclass - DiscoveryEvent::PartitionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails").msgclass - DiscoveryEvent::ActionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails").msgclass - DiscoveryEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EventType").enummodule - DiscoveryEvent::EntityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EntityType").enummodule - JobEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent").msgclass - JobEvent::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.Type").enummodule - JobEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.State").enummodule - JobEvent::Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.Service").enummodule - JobEvent::ExecutionTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.ExecutionTrigger").enummodule - SessionEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent").msgclass - SessionEvent::QueryDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.QueryDetail").msgclass - SessionEvent::QueryDetail::Engine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine").enummodule - SessionEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.EventType").enummodule - GovernanceEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent").msgclass - GovernanceEvent::Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.Entity").msgclass - GovernanceEvent::Entity::EntityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType").enummodule - GovernanceEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.EventType").enummodule - DataScanEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent").msgclass - DataScanEvent::DataProfileResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataProfileResult").msgclass - DataScanEvent::DataQualityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataQualityResult").msgclass - DataScanEvent::DataProfileAppliedConfigs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs").msgclass - DataScanEvent::DataQualityAppliedConfigs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs").msgclass - DataScanEvent::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult").msgclass - DataScanEvent::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult").msgclass - DataScanEvent::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State").enummodule - DataScanEvent::ScanType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.ScanType").enummodule - DataScanEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.State").enummodule - DataScanEvent::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.Trigger").enummodule - DataScanEvent::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.Scope").enummodule - DataQualityScanRuleResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult").msgclass - DataQualityScanRuleResult::RuleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType").enummodule - DataQualityScanRuleResult::EvaluationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType").enummodule - DataQualityScanRuleResult::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.Result").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb deleted file mode 100644 index 9f92bf741053..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/metadata.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\'google/cloud/dataplex/v1/metadata.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9e\x01\n\x13\x43reateEntityRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x35\n\x06\x65ntity\x18\x03 \x01(\x0b\x32 .google.cloud.dataplex.v1.EntityB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"h\n\x13UpdateEntityRequest\x12\x35\n\x06\x65ntity\x18\x02 \x01(\x0b\x32 .google.cloud.dataplex.v1.EntityB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"^\n\x13\x44\x65leteEntityRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xa3\x02\n\x13ListEntitiesRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12K\n\x04view\x18\x02 \x01(\x0e\x32\x38.google.cloud.dataplex.v1.ListEntitiesRequest.EntityViewB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"C\n\nEntityView\x12\x1b\n\x17\x45NTITY_VIEW_UNSPECIFIED\x10\x00\x12\n\n\x06TABLES\x10\x01\x12\x0c\n\x08\x46ILESETS\x10\x02\"c\n\x14ListEntitiesResponse\x12\x32\n\x08\x65ntities\x18\x01 \x03(\x0b\x32 .google.cloud.dataplex.v1.Entity\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xde\x01\n\x10GetEntityRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12H\n\x04view\x18\x02 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.GetEntityRequest.EntityViewB\x03\xe0\x41\x01\"J\n\nEntityView\x12\x1b\n\x17\x45NTITY_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\n\n\x06SCHEMA\x10\x02\x12\x08\n\x04\x46ULL\x10\x04\"\x95\x01\n\x15ListPartitionsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa9\x01\n\x16\x43reatePartitionRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12;\n\tpartition\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.PartitionB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x16\x44\x65letePartitionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/Partition\x12\x13\n\x04\x65tag\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x01\"j\n\x16ListPartitionsResponse\x12\x37\n\npartitions\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.Partition\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x13GetPartitionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/Partition\"\xc9\t\n\x06\x45ntity\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12;\n\x04type\x18\n \x01(\x0e\x32%.google.cloud.dataplex.v1.Entity.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x15\n\x05\x61sset\x18\x0b \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x19\n\tdata_path\x18\x0c \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1e\n\x11\x64\x61ta_path_pattern\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rcatalog_entry\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12?\n\x06system\x18\x0f \x01(\x0e\x32\'.google.cloud.dataplex.v1.StorageSystemB\x06\xe0\x41\x02\xe0\x41\x05\x12<\n\x06\x66ormat\x18\x10 \x01(\x0b\x32\'.google.cloud.dataplex.v1.StorageFormatB\x03\xe0\x41\x02\x12P\n\rcompatibility\x18\x13 \x01(\x0b\x32\x34.google.cloud.dataplex.v1.Entity.CompatibilityStatusB\x03\xe0\x41\x03\x12<\n\x06\x61\x63\x63\x65ss\x18\x15 \x01(\x0b\x32\'.google.cloud.dataplex.v1.StorageAccessB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12\x35\n\x06schema\x18\x32 \x01(\x0b\x32 .google.cloud.dataplex.v1.SchemaB\x03\xe0\x41\x02\x1a\x90\x02\n\x13\x43ompatibilityStatus\x12_\n\x0ehive_metastore\x18\x01 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.Entity.CompatibilityStatus.CompatibilityB\x03\xe0\x41\x03\x12Y\n\x08\x62igquery\x18\x02 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.Entity.CompatibilityStatus.CompatibilityB\x03\xe0\x41\x03\x1a=\n\rCompatibility\x12\x17\n\ncompatible\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x03\"4\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02:x\xea\x41u\n\x1e\x64\x61taplex.googleapis.com/Entity\x12Sprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}\"\xa1\x02\n\tPartition\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!dataplex.googleapis.com/Partition\x12\x16\n\x06values\x18\x02 \x03(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x08location\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x13\n\x04\x65tag\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x01:\x93\x01\xea\x41\x8f\x01\n!dataplex.googleapis.com/Partition\x12jprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}\"\xb7\x07\n\x06Schema\x12\x19\n\x0cuser_managed\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x41\n\x06\x66ields\x18\x02 \x03(\x0b\x32,.google.cloud.dataplex.v1.Schema.SchemaFieldB\x03\xe0\x41\x01\x12N\n\x10partition_fields\x18\x03 \x03(\x0b\x32/.google.cloud.dataplex.v1.Schema.PartitionFieldB\x03\xe0\x41\x01\x12M\n\x0fpartition_style\x18\x04 \x01(\x0e\x32/.google.cloud.dataplex.v1.Schema.PartitionStyleB\x03\xe0\x41\x01\x1a\xf1\x01\n\x0bSchemaField\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\x04type\x18\x03 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.TypeB\x03\xe0\x41\x02\x12\x38\n\x04mode\x18\x04 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.ModeB\x03\xe0\x41\x02\x12\x41\n\x06\x66ields\x18\n \x03(\x0b\x32,.google.cloud.dataplex.v1.Schema.SchemaFieldB\x03\xe0\x41\x01\x1a`\n\x0ePartitionField\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\x04type\x18\x02 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.TypeB\x06\xe0\x41\x02\xe0\x41\x05\"\xc9\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x42OOLEAN\x10\x01\x12\x08\n\x04\x42YTE\x10\x02\x12\t\n\x05INT16\x10\x03\x12\t\n\x05INT32\x10\x04\x12\t\n\x05INT64\x10\x05\x12\t\n\x05\x46LOAT\x10\x06\x12\n\n\x06\x44OUBLE\x10\x07\x12\x0b\n\x07\x44\x45\x43IMAL\x10\x08\x12\n\n\x06STRING\x10\t\x12\n\n\x06\x42INARY\x10\n\x12\r\n\tTIMESTAMP\x10\x0b\x12\x08\n\x04\x44\x41TE\x10\x0c\x12\x08\n\x04TIME\x10\r\x12\n\n\x06RECORD\x10\x0e\x12\x08\n\x04NULL\x10\x64\"F\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08REQUIRED\x10\x01\x12\x0c\n\x08NULLABLE\x10\x02\x12\x0c\n\x08REPEATED\x10\x03\"F\n\x0ePartitionStyle\x12\x1f\n\x1bPARTITION_STYLE_UNSPECIFIED\x10\x00\x12\x13\n\x0fHIVE_COMPATIBLE\x10\x01\"\xf4\x06\n\rStorageFormat\x12\x43\n\x06\x66ormat\x18\x01 \x01(\x0e\x32..google.cloud.dataplex.v1.StorageFormat.FormatB\x03\xe0\x41\x03\x12Z\n\x12\x63ompression_format\x18\x02 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.StorageFormat.CompressionFormatB\x03\xe0\x41\x01\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x03\x63sv\x18\n \x01(\x0b\x32\x32.google.cloud.dataplex.v1.StorageFormat.CsvOptionsB\x03\xe0\x41\x01H\x00\x12H\n\x04json\x18\x0b \x01(\x0b\x32\x33.google.cloud.dataplex.v1.StorageFormat.JsonOptionsB\x03\xe0\x41\x01H\x00\x12N\n\x07iceberg\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.StorageFormat.IcebergOptionsB\x03\xe0\x41\x01H\x00\x1ai\n\nCsvOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bheader_rows\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05quote\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x30\n\x0eIcebergOptions\x12\x1e\n\x11metadata_location\x18\x01 \x01(\tB\x03\xe0\x41\x01\"\xab\x01\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x0b\n\x07PARQUET\x10\x01\x12\x08\n\x04\x41VRO\x10\x02\x12\x07\n\x03ORC\x10\x03\x12\x07\n\x03\x43SV\x10\x64\x12\x08\n\x04JSON\x10\x65\x12\n\n\x05IMAGE\x10\xc8\x01\x12\n\n\x05\x41UDIO\x10\xc9\x01\x12\n\n\x05VIDEO\x10\xca\x01\x12\t\n\x04TEXT\x10\xcb\x01\x12\r\n\x08TFRECORD\x10\xcc\x01\x12\n\n\x05OTHER\x10\xe8\x07\x12\x0c\n\x07UNKNOWN\x10\xe9\x07\"L\n\x11\x43ompressionFormat\x12\"\n\x1e\x43OMPRESSION_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04GZIP\x10\x02\x12\t\n\x05\x42ZIP2\x10\x03\x42\t\n\x07options\"\x9a\x01\n\rStorageAccess\x12\x45\n\x04read\x18\x15 \x01(\x0e\x32\x32.google.cloud.dataplex.v1.StorageAccess.AccessModeB\x03\xe0\x41\x03\"B\n\nAccessMode\x12\x1b\n\x17\x41\x43\x43\x45SS_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44IRECT\x10\x01\x12\x0b\n\x07MANAGED\x10\x02*P\n\rStorageSystem\x12\x1e\n\x1aSTORAGE_SYSTEM_UNSPECIFIED\x10\x00\x12\x11\n\rCLOUD_STORAGE\x10\x01\x12\x0c\n\x08\x42IGQUERY\x10\x02\x32\x89\x0e\n\x0fMetadataService\x12\xbd\x01\n\x0c\x43reateEntity\x12-.google.cloud.dataplex.v1.CreateEntityRequest\x1a .google.cloud.dataplex.v1.Entity\"\\\xda\x41\rparent,entity\x82\xd3\xe4\x93\x02\x46\"*\x12\x12 e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a metadata entity. Only supports full resource update. - # - # @overload update_entity(request, options = nil) - # Pass arguments to `update_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_entity(entity: nil, validate_only: nil) - # Pass arguments to `update_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] - # Required. Update description. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new - # - # # Call the update_entity method. - # result = client.update_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def update_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_entity.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.entity&.name - header_params["entity.name"] = request.entity.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_entity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :update_entity, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a metadata entity. - # - # @overload delete_entity(request, options = nil) - # Pass arguments to `delete_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_entity(name: nil, etag: nil) - # Pass arguments to `delete_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param etag [::String] - # Required. The etag associated with the entity, which can be retrieved with - # a [GetEntity][] request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new - # - # # Call the delete_entity method. - # result = client.delete_entity request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_entity.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_entity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :delete_entity, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a metadata entity. - # - # @overload get_entity(request, options = nil) - # Pass arguments to `get_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_entity(name: nil, view: nil) - # Pass arguments to `get_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - # @param view [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] - # Optional. Used to select the subset of entity information to return. - # Defaults to `BASIC`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntityRequest.new - # - # # Call the get_entity method. - # result = client.get_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def get_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_entity.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_entity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :get_entity, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List metadata entities in a zone. - # - # @overload list_entities(request, options = nil) - # Pass arguments to `list_entities` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntitiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_entities` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param view [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] - # Required. Specify the entity view to make a partial list request. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new - # - # # Call the list_entities method. - # result = client.list_entities request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. - # p item - # end - # - def list_entities request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntitiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_entities.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_entities.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_entities.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :list_entities, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @metadata_service_stub, :list_entities, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a metadata partition. - # - # @overload create_partition(request, options = nil) - # Pass arguments to `create_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreatePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_partition(parent: nil, partition: nil, validate_only: nil) - # Pass arguments to `create_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param partition [::Google::Cloud::Dataplex::V1::Partition, ::Hash] - # Required. Partition resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new - # - # # Call the create_partition method. - # result = client.create_partition request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - # p result - # - def create_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreatePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_partition.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_partition.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :create_partition, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a metadata partition. - # - # @overload delete_partition(request, options = nil) - # Pass arguments to `delete_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeletePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_partition(name: nil, etag: nil) - # Pass arguments to `delete_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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 etag [::String] - # Optional. The etag associated with the partition. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new - # - # # Call the delete_partition method. - # result = client.delete_partition request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeletePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_partition.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_partition.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :delete_partition, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a metadata partition of an entity. - # - # @overload get_partition(request, options = nil) - # Pass arguments to `get_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetPartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_partition(name: nil) - # Pass arguments to `get_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new - # - # # Call the get_partition method. - # result = client.get_partition request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - # p result - # - def get_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetPartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_partition.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_partition.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :get_partition, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List metadata partitions of an entity. - # - # @overload list_partitions(request, options = nil) - # Pass arguments to `list_partitions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListPartitionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_partitions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new - # - # # Call the list_partitions method. - # result = client.list_partitions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. - # p item - # end - # - def list_partitions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListPartitionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_partitions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_partitions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_partitions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :list_partitions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @metadata_service_stub, :list_partitions, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the MetadataService API. - # - # This class represents the configuration for MetadataService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::MetadataService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_entity to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::MetadataService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_entity.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_entity.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the MetadataService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entity - ## - # RPC-specific configuration for `update_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entity - ## - # RPC-specific configuration for `delete_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entity - ## - # RPC-specific configuration for `get_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entity - ## - # RPC-specific configuration for `list_entities` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entities - ## - # RPC-specific configuration for `create_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :create_partition - ## - # RPC-specific configuration for `delete_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_partition - ## - # RPC-specific configuration for `get_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :get_partition - ## - # RPC-specific configuration for `list_partitions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_partitions - - # @private - def initialize parent_rpcs = nil - create_entity_config = parent_rpcs.create_entity if parent_rpcs.respond_to? :create_entity - @create_entity = ::Gapic::Config::Method.new create_entity_config - update_entity_config = parent_rpcs.update_entity if parent_rpcs.respond_to? :update_entity - @update_entity = ::Gapic::Config::Method.new update_entity_config - delete_entity_config = parent_rpcs.delete_entity if parent_rpcs.respond_to? :delete_entity - @delete_entity = ::Gapic::Config::Method.new delete_entity_config - get_entity_config = parent_rpcs.get_entity if parent_rpcs.respond_to? :get_entity - @get_entity = ::Gapic::Config::Method.new get_entity_config - list_entities_config = parent_rpcs.list_entities if parent_rpcs.respond_to? :list_entities - @list_entities = ::Gapic::Config::Method.new list_entities_config - create_partition_config = parent_rpcs.create_partition if parent_rpcs.respond_to? :create_partition - @create_partition = ::Gapic::Config::Method.new create_partition_config - delete_partition_config = parent_rpcs.delete_partition if parent_rpcs.respond_to? :delete_partition - @delete_partition = ::Gapic::Config::Method.new delete_partition_config - get_partition_config = parent_rpcs.get_partition if parent_rpcs.respond_to? :get_partition - @get_partition = ::Gapic::Config::Method.new get_partition_config - list_partitions_config = parent_rpcs.list_partitions if parent_rpcs.respond_to? :list_partitions - @list_partitions = ::Gapic::Config::Method.new list_partitions_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb deleted file mode 100644 index ebb897d11c17..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module MetadataService - # Credentials for the MetadataService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb deleted file mode 100644 index f17baadf07d2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb +++ /dev/null @@ -1,102 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - module MetadataService - # Path helper methods for the MetadataService API. - module Paths - ## - # Create a fully-qualified Entity resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # @param entity [String] - # - # @return [::String] - def entity_path project:, location:, lake:, zone:, entity: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}" - end - - ## - # Create a fully-qualified Partition resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # @param entity [String] - # @param partition [String] - # - # @return [::String] - def partition_path project:, location:, lake:, zone:, entity:, partition: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - raise ::ArgumentError, "entity cannot contain /" if entity.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}/partitions/#{partition}" - end - - ## - # Create a fully-qualified Zone resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # - # @return [::String] - def zone_path project:, location:, lake:, zone: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb deleted file mode 100644 index 27a710ff906d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/metadata_service/credentials" -require "google/cloud/dataplex/v1/metadata_service/paths" -require "google/cloud/dataplex/v1/metadata_service/rest/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # Metadata service manages metadata resources such as tables, filesets and - # partitions. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/metadata_service/rest" - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - module MetadataService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/metadata_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb deleted file mode 100644 index ae31aa2694a6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb +++ /dev/null @@ -1,1233 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/metadata_pb" -require "google/cloud/dataplex/v1/metadata_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module MetadataService - module Rest - ## - # REST client for the MetadataService service. - # - # Metadata service manages metadata resources such as tables, filesets and - # partitions. - # - class Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :metadata_service_stub - - ## - # Configure the MetadataService Client class. - # - # See {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all MetadataService clients - # ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_entity.timeout = 60.0 - - default_config.rpcs.update_entity.timeout = 60.0 - - default_config.rpcs.delete_entity.timeout = 60.0 - - default_config.rpcs.get_entity.timeout = 60.0 - default_config.rpcs.get_entity.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_entities.timeout = 60.0 - default_config.rpcs.list_entities.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_partition.timeout = 60.0 - - default_config.rpcs.delete_partition.timeout = 60.0 - - default_config.rpcs.get_partition.timeout = 60.0 - default_config.rpcs.get_partition.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_partitions.timeout = 60.0 - default_config.rpcs.list_partitions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the MetadataService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @metadata_service_stub.universe_domain - end - - ## - # Create a new MetadataService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the MetadataService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @metadata_service_stub = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @metadata_service_stub.endpoint - config.universe_domain = @metadata_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @metadata_service_stub.endpoint - config.universe_domain = @metadata_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Create a metadata entity. - # - # @overload create_entity(request, options = nil) - # Pass arguments to `create_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_entity(parent: nil, entity: nil, validate_only: nil) - # Pass arguments to `create_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] - # Required. Entity resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntityRequest.new - # - # # Call the create_entity method. - # result = client.create_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def create_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_entity.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_entity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.create_entity request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a metadata entity. Only supports full resource update. - # - # @overload update_entity(request, options = nil) - # Pass arguments to `update_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_entity(entity: nil, validate_only: nil) - # Pass arguments to `update_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] - # Required. Update description. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new - # - # # Call the update_entity method. - # result = client.update_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def update_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_entity.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_entity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.update_entity request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a metadata entity. - # - # @overload delete_entity(request, options = nil) - # Pass arguments to `delete_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_entity(name: nil, etag: nil) - # Pass arguments to `delete_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param etag [::String] - # Required. The etag associated with the entity, which can be retrieved with - # a [GetEntity][] request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new - # - # # Call the delete_entity method. - # result = client.delete_entity request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_entity.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_entity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.delete_entity request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a metadata entity. - # - # @overload get_entity(request, options = nil) - # Pass arguments to `get_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_entity(name: nil, view: nil) - # Pass arguments to `get_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - # @param view [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] - # Optional. Used to select the subset of entity information to return. - # Defaults to `BASIC`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntityRequest.new - # - # # Call the get_entity method. - # result = client.get_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def get_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_entity.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_entity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.get_entity request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List metadata entities in a zone. - # - # @overload list_entities(request, options = nil) - # Pass arguments to `list_entities` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntitiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_entities` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param view [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] - # Required. Specify the entity view to make a partial list request. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new - # - # # Call the list_entities method. - # result = client.list_entities request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. - # p item - # end - # - def list_entities request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntitiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_entities.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_entities.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_entities.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.list_entities request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_entities, "entities", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a metadata partition. - # - # @overload create_partition(request, options = nil) - # Pass arguments to `create_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreatePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_partition(parent: nil, partition: nil, validate_only: nil) - # Pass arguments to `create_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param partition [::Google::Cloud::Dataplex::V1::Partition, ::Hash] - # Required. Partition resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new - # - # # Call the create_partition method. - # result = client.create_partition request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - # p result - # - def create_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreatePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_partition.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_partition.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.create_partition request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a metadata partition. - # - # @overload delete_partition(request, options = nil) - # Pass arguments to `delete_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeletePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_partition(name: nil, etag: nil) - # Pass arguments to `delete_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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 etag [::String] - # Optional. The etag associated with the partition. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new - # - # # Call the delete_partition method. - # result = client.delete_partition request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeletePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_partition.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_partition.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.delete_partition request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a metadata partition of an entity. - # - # @overload get_partition(request, options = nil) - # Pass arguments to `get_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetPartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_partition(name: nil) - # Pass arguments to `get_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new - # - # # Call the get_partition method. - # result = client.get_partition request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - # p result - # - def get_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetPartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_partition.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_partition.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.get_partition request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List metadata partitions of an entity. - # - # @overload list_partitions(request, options = nil) - # Pass arguments to `list_partitions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListPartitionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_partitions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new - # - # # Call the list_partitions method. - # result = client.list_partitions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. - # p item - # end - # - def list_partitions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListPartitionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_partitions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_partitions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_partitions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.list_partitions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_partitions, "partitions", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the MetadataService REST API. - # - # This class represents the configuration for MetadataService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_entity to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_entity.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_entity.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the MetadataService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entity - ## - # RPC-specific configuration for `update_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entity - ## - # RPC-specific configuration for `delete_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entity - ## - # RPC-specific configuration for `get_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entity - ## - # RPC-specific configuration for `list_entities` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entities - ## - # RPC-specific configuration for `create_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :create_partition - ## - # RPC-specific configuration for `delete_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_partition - ## - # RPC-specific configuration for `get_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :get_partition - ## - # RPC-specific configuration for `list_partitions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_partitions - - # @private - def initialize parent_rpcs = nil - create_entity_config = parent_rpcs.create_entity if parent_rpcs.respond_to? :create_entity - @create_entity = ::Gapic::Config::Method.new create_entity_config - update_entity_config = parent_rpcs.update_entity if parent_rpcs.respond_to? :update_entity - @update_entity = ::Gapic::Config::Method.new update_entity_config - delete_entity_config = parent_rpcs.delete_entity if parent_rpcs.respond_to? :delete_entity - @delete_entity = ::Gapic::Config::Method.new delete_entity_config - get_entity_config = parent_rpcs.get_entity if parent_rpcs.respond_to? :get_entity - @get_entity = ::Gapic::Config::Method.new get_entity_config - list_entities_config = parent_rpcs.list_entities if parent_rpcs.respond_to? :list_entities - @list_entities = ::Gapic::Config::Method.new list_entities_config - create_partition_config = parent_rpcs.create_partition if parent_rpcs.respond_to? :create_partition - @create_partition = ::Gapic::Config::Method.new create_partition_config - delete_partition_config = parent_rpcs.delete_partition if parent_rpcs.respond_to? :delete_partition - @delete_partition = ::Gapic::Config::Method.new delete_partition_config - get_partition_config = parent_rpcs.get_partition if parent_rpcs.respond_to? :get_partition - @get_partition = ::Gapic::Config::Method.new get_partition_config - list_partitions_config = parent_rpcs.list_partitions if parent_rpcs.respond_to? :list_partitions - @list_partitions = ::Gapic::Config::Method.new list_partitions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb deleted file mode 100644 index 6c1684ce4a3c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb +++ /dev/null @@ -1,603 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/metadata_pb" - -module Google - module Cloud - module Dataplex - module V1 - module MetadataService - module Rest - ## - # REST service stub for the MetadataService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the create_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # A result object deserialized from the server's reply - def create_entity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_entity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entity.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # A result object deserialized from the server's reply - def update_entity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_entity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entity.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_entity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_entity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # A result object deserialized from the server's reply - def get_entity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_entity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entity.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_entities REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntitiesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntitiesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntitiesResponse] - # A result object deserialized from the server's reply - def list_entities request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_entities_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreatePartitionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # A result object deserialized from the server's reply - def create_partition request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_partition_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Partition.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeletePartitionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_partition request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_partition_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetPartitionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # A result object deserialized from the server's reply - def get_partition request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_partition_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Partition.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_partitions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListPartitionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListPartitionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListPartitionsResponse] - # A result object deserialized from the server's reply - def list_partitions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_partitions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the create_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_entity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/entities", - body: "entity", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_entity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1/{entity.name}", - body: "entity", - matches: [ - ["entity.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_entity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_entity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_entities REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntitiesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_entities_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/entities", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreatePartitionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_partition_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/partitions", - body: "partition", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeletePartitionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_partition_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetPartitionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_partition_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_partitions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListPartitionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_partitions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/partitions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb deleted file mode 100644 index 4758e42b9719..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/metadata.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# - -require 'grpc' -require 'google/cloud/dataplex/v1/metadata_pb' - -module Google - module Cloud - module Dataplex - module V1 - module MetadataService - # Metadata service manages metadata resources such as tables, filesets and - # partitions. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.MetadataService' - - # Create a metadata entity. - rpc :CreateEntity, ::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Google::Cloud::Dataplex::V1::Entity - # Update a metadata entity. Only supports full resource update. - rpc :UpdateEntity, ::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Google::Cloud::Dataplex::V1::Entity - # Delete a metadata entity. - rpc :DeleteEntity, ::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Google::Protobuf::Empty - # Get a metadata entity. - rpc :GetEntity, ::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Google::Cloud::Dataplex::V1::Entity - # List metadata entities in a zone. - rpc :ListEntities, ::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Google::Cloud::Dataplex::V1::ListEntitiesResponse - # Create a metadata partition. - rpc :CreatePartition, ::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Google::Cloud::Dataplex::V1::Partition - # Delete a metadata partition. - rpc :DeletePartition, ::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Google::Protobuf::Empty - # Get a metadata partition of an entity. - rpc :GetPartition, ::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Google::Cloud::Dataplex::V1::Partition - # List metadata partitions of an entity. - rpc :ListPartitions, ::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Google::Cloud::Dataplex::V1::ListPartitionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb deleted file mode 100644 index 49ecd409bebe..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/processing.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n)google/cloud/dataplex/v1/processing.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xbd\x01\n\x07Trigger\x12?\n\ton_demand\x18\x64 \x01(\x0b\x32*.google.cloud.dataplex.v1.Trigger.OnDemandH\x00\x12>\n\x08schedule\x18\x65 \x01(\x0b\x32*.google.cloud.dataplex.v1.Trigger.ScheduleH\x00\x1a\n\n\x08OnDemand\x1a\x1d\n\x08Schedule\x12\x11\n\x04\x63ron\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x06\n\x04mode\"i\n\nDataSource\x12\x38\n\x06\x65ntity\x18\x64 \x01(\tB&\xe0\x41\x05\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/EntityH\x00\x12\x17\n\x08resource\x18\x65 \x01(\tB\x03\xe0\x41\x05H\x00\x42\x08\n\x06source\"\xaf\x01\n\x0bScannedData\x12S\n\x11incremental_field\x18\x01 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.ScannedData.IncrementalFieldH\x00\x1a=\n\x10IncrementalField\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\r\n\x05start\x18\x02 \x01(\t\x12\x0b\n\x03\x65nd\x18\x03 \x01(\tB\x0c\n\ndata_rangeBk\n\x1c\x63om.google.cloud.dataplex.v1B\x0fProcessingProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger").msgclass - Trigger::OnDemand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger.OnDemand").msgclass - Trigger::Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger.Schedule").msgclass - DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataSource").msgclass - ScannedData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ScannedData").msgclass - ScannedData::IncrementalField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ScannedData.IncrementalField").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb deleted file mode 100644 index 9588f77a6f82..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n(google/cloud/dataplex/v1/resources.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfa\x07\n\x04Lake\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x06 \x03(\x0b\x32*.google.cloud.dataplex.v1.Lake.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x1c\n\x0fservice_account\x18\t \x01(\tB\x03\xe0\x41\x03\x12@\n\tmetastore\x18\x66 \x01(\x0b\x32(.google.cloud.dataplex.v1.Lake.MetastoreB\x03\xe0\x41\x01\x12@\n\x0c\x61sset_status\x18g \x01(\x0b\x32%.google.cloud.dataplex.v1.AssetStatusB\x03\xe0\x41\x03\x12M\n\x10metastore_status\x18h \x01(\x0b\x32..google.cloud.dataplex.v1.Lake.MetastoreStatusB\x03\xe0\x41\x03\x1a!\n\tMetastore\x12\x14\n\x07service\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xf8\x01\n\x0fMetastoreStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Lake.MetastoreStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x65ndpoint\x18\x04 \x01(\t\"L\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:W\xea\x41T\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x34projects/{project}/locations/{location}/lakes/{lake}\"~\n\x0b\x41ssetStatus\x12/\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\ractive_assets\x18\x02 \x01(\x05\x12\'\n\x1fsecurity_policy_applying_assets\x18\x03 \x01(\x05\"\xf4\x0b\n\x04Zone\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x06 \x03(\x0b\x32*.google.cloud.dataplex.v1.Zone.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x39\n\x04type\x18\t \x01(\x0e\x32#.google.cloud.dataplex.v1.Zone.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12I\n\x0e\x64iscovery_spec\x18g \x01(\x0b\x32,.google.cloud.dataplex.v1.Zone.DiscoverySpecB\x03\xe0\x41\x01\x12G\n\rresource_spec\x18h \x01(\x0b\x32+.google.cloud.dataplex.v1.Zone.ResourceSpecB\x03\xe0\x41\x02\x12@\n\x0c\x61sset_status\x18i \x01(\x0b\x32%.google.cloud.dataplex.v1.AssetStatusB\x03\xe0\x41\x03\x1a\xbb\x01\n\x0cResourceSpec\x12W\n\rlocation_type\x18\x01 \x01(\x0e\x32\x38.google.cloud.dataplex.v1.Zone.ResourceSpec.LocationTypeB\x06\xe0\x41\x02\xe0\x41\x05\"R\n\x0cLocationType\x12\x1d\n\x19LOCATION_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSINGLE_REGION\x10\x01\x12\x10\n\x0cMULTI_REGION\x10\x02\x1a\xf6\x03\n\rDiscoverySpec\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1d\n\x10include_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12Q\n\x0b\x63sv_options\x18\x04 \x01(\x0b\x32\x37.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptionsB\x03\xe0\x41\x01\x12S\n\x0cjson_options\x18\x05 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptionsB\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\n \x01(\tB\x03\xe0\x41\x01H\x00\x1az\n\nCsvOptions\x12\x18\n\x0bheader_rows\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\t\n\x07trigger\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03RAW\x10\x01\x12\x0b\n\x07\x43URATED\x10\x02:d\xea\x41\x61\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x41projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}\"\xab\x11\n\x06\x41\x63tion\x12;\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32).google.cloud.dataplex.v1.Action.Category\x12\r\n\x05issue\x18\x02 \x01(\t\x12/\n\x0b\x64\x65tect_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x04name\x18\x05 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Action\x12\x32\n\x04lake\x18\x06 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x32\n\x04zone\x18\x07 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x34\n\x05\x61sset\x18\x08 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x16\n\x0e\x64\x61ta_locations\x18\t \x03(\t\x12Q\n\x13invalid_data_format\x18\n \x01(\x0b\x32\x32.google.cloud.dataplex.v1.Action.InvalidDataFormatH\x00\x12[\n\x18incompatible_data_schema\x18\x0b \x01(\x0b\x32\x37.google.cloud.dataplex.v1.Action.IncompatibleDataSchemaH\x00\x12W\n\x16invalid_data_partition\x18\x0c \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Action.InvalidDataPartitionH\x00\x12\x44\n\x0cmissing_data\x18\r \x01(\x0b\x32,.google.cloud.dataplex.v1.Action.MissingDataH\x00\x12L\n\x10missing_resource\x18\x0e \x01(\x0b\x32\x30.google.cloud.dataplex.v1.Action.MissingResourceH\x00\x12V\n\x15unauthorized_resource\x18\x0f \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Action.UnauthorizedResourceH\x00\x12\x62\n\x1c\x66\x61iled_security_policy_apply\x18\x15 \x01(\x0b\x32:.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApplyH\x00\x12]\n\x19invalid_data_organization\x18\x16 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Action.InvalidDataOrganizationH\x00\x1a\x11\n\x0fMissingResource\x1a\x16\n\x14UnauthorizedResource\x1a*\n\x19\x46\x61iledSecurityPolicyApply\x12\r\n\x05\x61sset\x18\x01 \x01(\t\x1a`\n\x11InvalidDataFormat\x12\x1e\n\x16sampled_data_locations\x18\x01 \x03(\t\x12\x17\n\x0f\x65xpected_format\x18\x02 \x01(\t\x12\x12\n\nnew_format\x18\x03 \x01(\t\x1a\xa0\x02\n\x16IncompatibleDataSchema\x12\r\n\x05table\x18\x01 \x01(\t\x12\x17\n\x0f\x65xisting_schema\x18\x02 \x01(\t\x12\x12\n\nnew_schema\x18\x03 \x01(\t\x12\x1e\n\x16sampled_data_locations\x18\x04 \x03(\t\x12[\n\rschema_change\x18\x05 \x01(\x0e\x32\x44.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange\"M\n\x0cSchemaChange\x12\x1d\n\x19SCHEMA_CHANGE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINCOMPATIBLE\x10\x01\x12\x0c\n\x08MODIFIED\x10\x02\x1a\xe1\x01\n\x14InvalidDataPartition\x12\x64\n\x12\x65xpected_structure\x18\x01 \x01(\x0e\x32H.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure\"c\n\x12PartitionStructure\x12#\n\x1fPARTITION_STRUCTURE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43ONSISTENT_KEYS\x10\x01\x12\x13\n\x0fHIVE_STYLE_KEYS\x10\x02\x1a\r\n\x0bMissingData\x1a\x19\n\x17InvalidDataOrganization\"f\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x17\n\x13RESOURCE_MANAGEMENT\x10\x01\x12\x13\n\x0fSECURITY_POLICY\x10\x02\x12\x12\n\x0e\x44\x41TA_DISCOVERY\x10\x03:\xa2\x02\xea\x41\x9e\x02\n\x1e\x64\x61taplex.googleapis.com/Action\x12\x45projects/{project}/locations/{location}/lakes/{lake}/actions/{action}\x12Rprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}\x12\x61projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}B\t\n\x07\x64\x65tails\"\xa4\x15\n\x05\x41sset\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x06labels\x18\x06 \x03(\x0b\x32+.google.cloud.dataplex.v1.Asset.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12H\n\rresource_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.Asset.ResourceSpecB\x03\xe0\x41\x02\x12L\n\x0fresource_status\x18\x65 \x01(\x0b\x32..google.cloud.dataplex.v1.Asset.ResourceStatusB\x03\xe0\x41\x03\x12L\n\x0fsecurity_status\x18g \x01(\x0b\x32..google.cloud.dataplex.v1.Asset.SecurityStatusB\x03\xe0\x41\x03\x12J\n\x0e\x64iscovery_spec\x18j \x01(\x0b\x32-.google.cloud.dataplex.v1.Asset.DiscoverySpecB\x03\xe0\x41\x01\x12N\n\x10\x64iscovery_status\x18k \x01(\x0b\x32/.google.cloud.dataplex.v1.Asset.DiscoveryStatusB\x03\xe0\x41\x03\x1a\xdb\x01\n\x0eSecurityStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Asset.SecurityStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"B\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x41PPLYING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x1a\xf8\x03\n\rDiscoverySpec\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10include_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12R\n\x0b\x63sv_options\x18\x04 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptionsB\x03\xe0\x41\x01\x12T\n\x0cjson_options\x18\x05 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptionsB\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\n \x01(\tB\x03\xe0\x41\x01H\x00\x1az\n\nCsvOptions\x12\x18\n\x0bheader_rows\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\t\n\x07trigger\x1a\xce\x02\n\x0cResourceSpec\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12G\n\x04type\x18\x02 \x01(\x0e\x32\x31.google.cloud.dataplex.v1.Asset.ResourceSpec.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12V\n\x10read_access_mode\x18\x05 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessModeB\x03\xe0\x41\x01\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTORAGE_BUCKET\x10\x01\x12\x14\n\x10\x42IGQUERY_DATASET\x10\x02\"B\n\nAccessMode\x12\x1b\n\x17\x41\x43\x43\x45SS_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44IRECT\x10\x01\x12\x0b\n\x07MANAGED\x10\x02\x1a\xf3\x01\n\x0eResourceStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Asset.ResourceStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12$\n\x17managed_access_identity\x18\x04 \x01(\tB\x03\xe0\x41\x03\"4\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x1a\xf4\x03\n\x0f\x44iscoveryStatus\x12\x44\n\x05state\x18\x01 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_run_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x05stats\x18\x06 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats\x12\x34\n\x11last_run_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x1aP\n\x05Stats\x12\x12\n\ndata_items\x18\x01 \x01(\x03\x12\x11\n\tdata_size\x18\x02 \x01(\x03\x12\x0e\n\x06tables\x18\x03 \x01(\x03\x12\x10\n\x08\x66ilesets\x18\x04 \x01(\x03\"X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\x0c\n\x08\x44ISABLED\x10\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n\x1d\x64\x61taplex.googleapis.com/Asset\x12Pprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}*[\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x13\n\x0f\x41\x43TION_REQUIRED\x10\x04\x42j\n\x1c\x63om.google.cloud.dataplex.v1B\x0eResourcesProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - Lake = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake").msgclass - Lake::Metastore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.Metastore").msgclass - Lake::MetastoreStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.MetastoreStatus").msgclass - Lake::MetastoreStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.MetastoreStatus.State").enummodule - AssetStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AssetStatus").msgclass - Zone = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone").msgclass - Zone::ResourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.ResourceSpec").msgclass - Zone::ResourceSpec::LocationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType").enummodule - Zone::DiscoverySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec").msgclass - Zone::DiscoverySpec::CsvOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions").msgclass - Zone::DiscoverySpec::JsonOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions").msgclass - Zone::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.Type").enummodule - Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action").msgclass - Action::MissingResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.MissingResource").msgclass - Action::UnauthorizedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.UnauthorizedResource").msgclass - Action::FailedSecurityPolicyApply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply").msgclass - Action::InvalidDataFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataFormat").msgclass - Action::IncompatibleDataSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.IncompatibleDataSchema").msgclass - Action::IncompatibleDataSchema::SchemaChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange").enummodule - Action::InvalidDataPartition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataPartition").msgclass - Action::InvalidDataPartition::PartitionStructure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure").enummodule - Action::MissingData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.MissingData").msgclass - Action::InvalidDataOrganization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataOrganization").msgclass - Action::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.Category").enummodule - Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset").msgclass - Asset::SecurityStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.SecurityStatus").msgclass - Asset::SecurityStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.SecurityStatus.State").enummodule - Asset::DiscoverySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec").msgclass - Asset::DiscoverySpec::CsvOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions").msgclass - Asset::DiscoverySpec::JsonOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions").msgclass - Asset::ResourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec").msgclass - Asset::ResourceSpec::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec.Type").enummodule - Asset::ResourceSpec::AccessMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode").enummodule - Asset::ResourceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceStatus").msgclass - Asset::ResourceStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceStatus.State").enummodule - Asset::DiscoveryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus").msgclass - Asset::DiscoveryStatus::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats").msgclass - Asset::DiscoveryStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus.State").enummodule - State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb deleted file mode 100644 index ef6ed7dc41ff..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/dataplex_service/rest" -require "google/cloud/dataplex/v1/catalog_service/rest" -require "google/cloud/dataplex/v1/content_service/rest" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest" -require "google/cloud/dataplex/v1/data_scan_service/rest" -require "google/cloud/dataplex/v1/metadata_service/rest" -require "google/cloud/dataplex/v1/bindings_override" -require "google/cloud/dataplex/v1/version" - -module Google - module Cloud - module Dataplex - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/dataplex/v1/rest" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb deleted file mode 100644 index 0afab5d5d3ac..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/security.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\'google/cloud/dataplex/v1/security.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\"U\n\x12ResourceAccessSpec\x12\x14\n\x07readers\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x14\n\x07writers\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06owners\x18\x03 \x03(\tB\x03\xe0\x41\x01\"&\n\x0e\x44\x61taAccessSpec\x12\x14\n\x07readers\x18\x01 \x03(\tB\x03\xe0\x41\x01\x42i\n\x1c\x63om.google.cloud.dataplex.v1B\rSecurityProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - ResourceAccessSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ResourceAccessSpec").msgclass - DataAccessSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAccessSpec").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb deleted file mode 100644 index f7926ab78db0..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb +++ /dev/null @@ -1,101 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/analyze_pb' -require 'google/cloud/dataplex/v1/resources_pb' -require 'google/cloud/dataplex/v1/tasks_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/dataplex/v1/service.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/analyze.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a$google/cloud/dataplex/v1/tasks.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x01\n\x11\x43reateLakeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x14\n\x07lake_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x04lake\x18\x03 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.LakeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x11UpdateLakeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x31\n\x04lake\x18\x02 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.LakeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x11\x44\x65leteLakeRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\"\xaa\x01\n\x10ListLakesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x11ListLakesResponse\x12-\n\x05lakes\x18\x01 \x03(\x0b\x32\x1e.google.cloud.dataplex.v1.Lake\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"\x7f\n\x16ListLakeActionsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"a\n\x13ListActionsResponse\x12\x31\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32 .google.cloud.dataplex.v1.Action\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"D\n\x0eGetLakeRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\"\xae\x01\n\x11\x43reateZoneRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x14\n\x07zone_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x04zone\x18\x03 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.ZoneB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x11UpdateZoneRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x31\n\x04zone\x18\x02 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.ZoneB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x11\x44\x65leteZoneRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\"\xa5\x01\n\x10ListZonesRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"[\n\x11ListZonesResponse\x12-\n\x05zones\x18\x01 \x03(\x0b\x32\x1e.google.cloud.dataplex.v1.Zone\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x7f\n\x16ListZoneActionsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"D\n\x0eGetZoneRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\"\xb2\x01\n\x12\x43reateAssetRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x15\n\x08\x61sset_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x05\x61sset\x18\x03 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.AssetB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x9b\x01\n\x12UpdateAssetRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x33\n\x05\x61sset\x18\x02 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.AssetB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"I\n\x12\x44\x65leteAssetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\"\xa6\x01\n\x11ListAssetsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"^\n\x12ListAssetsResponse\x12/\n\x06\x61ssets\x18\x01 \x03(\x0b\x32\x1f.google.cloud.dataplex.v1.Asset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x81\x01\n\x17ListAssetActionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"F\n\x0fGetAssetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xae\x01\n\x11\x43reateTaskRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x14\n\x07task_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x04task\x18\x03 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.TaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x11UpdateTaskRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x31\n\x04task\x18\x02 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.TaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x11\x44\x65leteTaskRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\"\xa5\x01\n\x10ListTasksRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x11ListTasksResponse\x12-\n\x05tasks\x18\x01 \x03(\x0b\x32\x1e.google.cloud.dataplex.v1.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"D\n\x0eGetTaskRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\"B\n\rGetJobRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x64\x61taplex.googleapis.com/Job\"\xb2\x02\n\x0eRunTaskRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.RunTaskRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x45\n\x04\x61rgs\x18\x04 \x03(\x0b\x32\x32.google.cloud.dataplex.v1.RunTaskRequest.ArgsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"=\n\x0fRunTaskResponse\x12*\n\x03job\x18\x01 \x01(\x0b\x32\x1d.google.cloud.dataplex.v1.Job\"x\n\x0fListJobsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"X\n\x10ListJobsResponse\x12+\n\x04jobs\x18\x01 \x03(\x0b\x32\x1d.google.cloud.dataplex.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"E\n\x10\x43\x61ncelJobRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x64\x61taplex.googleapis.com/Job\"\xca\x01\n\x18\x43reateEnvironmentRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x1b\n\x0e\x65nvironment_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0b\x65nvironment\x18\x03 \x01(\x0b\x32%.google.cloud.dataplex.v1.EnvironmentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xad\x01\n\x18UpdateEnvironmentRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12?\n\x0b\x65nvironment\x18\x02 \x01(\x0b\x32%.google.cloud.dataplex.v1.EnvironmentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"U\n\x18\x44\x65leteEnvironmentRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/Environment\"\xac\x01\n\x17ListEnvironmentsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"p\n\x18ListEnvironmentsResponse\x12;\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32%.google.cloud.dataplex.v1.Environment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x15GetEnvironmentRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/Environment\"\x98\x01\n\x13ListSessionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/Environment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"d\n\x14ListSessionsResponse\x12\x33\n\x08sessions\x18\x01 \x03(\x0b\x32!.google.cloud.dataplex.v1.Session\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xac\x32\n\x0f\x44\x61taplexService\x12\xc3\x01\n\nCreateLake\x12+.google.cloud.dataplex.v1.CreateLakeRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41\x19\n\x04Lake\x12\x11OperationMetadata\xda\x41\x13parent,lake,lake_id\x82\xd3\xe4\x93\x02\x31\")/v1/{parent=projects/*/locations/*}/lakes:\x04lake\x12\xc5\x01\n\nUpdateLake\x12+.google.cloud.dataplex.v1.UpdateLakeRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41\x19\n\x04Lake\x12\x11OperationMetadata\xda\x41\x10lake,update_mask\x82\xd3\xe4\x93\x02\x36\x32./v1/{lake.name=projects/*/locations/*/lakes/*}:\x04lake\x12\xbf\x01\n\nDeleteLake\x12+.google.cloud.dataplex.v1.DeleteLakeRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02+*)/v1/{name=projects/*/locations/*/lakes/*}\x12\xa0\x01\n\tListLakes\x12*.google.cloud.dataplex.v1.ListLakesRequest\x1a+.google.cloud.dataplex.v1.ListLakesResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/v1/{parent=projects/*/locations/*}/lakes\x12\x8d\x01\n\x07GetLake\x12(.google.cloud.dataplex.v1.GetLakeRequest\x1a\x1e.google.cloud.dataplex.v1.Lake\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/v1/{name=projects/*/locations/*/lakes/*}\x12\xb8\x01\n\x0fListLakeActions\x12\x30.google.cloud.dataplex.v1.ListLakeActionsRequest\x1a-.google.cloud.dataplex.v1.ListActionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*/lakes/*}/actions\x12\xcb\x01\n\nCreateZone\x12+.google.cloud.dataplex.v1.CreateZoneRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41\x19\n\x04Zone\x12\x11OperationMetadata\xda\x41\x13parent,zone,zone_id\x82\xd3\xe4\x93\x02\x39\"1/v1/{parent=projects/*/locations/*/lakes/*}/zones:\x04zone\x12\xcd\x01\n\nUpdateZone\x12+.google.cloud.dataplex.v1.UpdateZoneRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x19\n\x04Zone\x12\x11OperationMetadata\xda\x41\x10zone,update_mask\x82\xd3\xe4\x93\x02>26/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}:\x04zone\x12\xc7\x01\n\nDeleteZone\x12+.google.cloud.dataplex.v1.DeleteZoneRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/lakes/*/zones/*}\x12\xa8\x01\n\tListZones\x12*.google.cloud.dataplex.v1.ListZonesRequest\x1a+.google.cloud.dataplex.v1.ListZonesResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*/lakes/*}/zones\x12\x95\x01\n\x07GetZone\x12(.google.cloud.dataplex.v1.GetZoneRequest\x1a\x1e.google.cloud.dataplex.v1.Zone\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/lakes/*/zones/*}\x12\xc0\x01\n\x0fListZoneActions\x12\x30.google.cloud.dataplex.v1.ListZoneActionsRequest\x1a-.google.cloud.dataplex.v1.ListActionsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions\x12\xda\x01\n\x0b\x43reateAsset\x12,.google.cloud.dataplex.v1.CreateAssetRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x1a\n\x05\x41sset\x12\x11OperationMetadata\xda\x41\x15parent,asset,asset_id\x82\xd3\xe4\x93\x02\x43\":/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets:\x05\x61sset\x12\xdd\x01\n\x0bUpdateAsset\x12,.google.cloud.dataplex.v1.UpdateAssetRequest\x1a\x1d.google.longrunning.Operation\"\x80\x01\xca\x41\x1a\n\x05\x41sset\x12\x11OperationMetadata\xda\x41\x11\x61sset,update_mask\x82\xd3\xe4\x93\x02I2@/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}:\x05\x61sset\x12\xd2\x01\n\x0b\x44\x65leteAsset\x12,.google.cloud.dataplex.v1.DeleteAssetRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}\x12\xb4\x01\n\nListAssets\x12+.google.cloud.dataplex.v1.ListAssetsRequest\x1a,.google.cloud.dataplex.v1.ListAssetsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets\x12\xa1\x01\n\x08GetAsset\x12).google.cloud.dataplex.v1.GetAssetRequest\x1a\x1f.google.cloud.dataplex.v1.Asset\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}\x12\xcb\x01\n\x10ListAssetActions\x12\x31.google.cloud.dataplex.v1.ListAssetActionsRequest\x1a-.google.cloud.dataplex.v1.ListActionsResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions\x12\xcb\x01\n\nCreateTask\x12+.google.cloud.dataplex.v1.CreateTaskRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41\x19\n\x04Task\x12\x11OperationMetadata\xda\x41\x13parent,task,task_id\x82\xd3\xe4\x93\x02\x39\"1/v1/{parent=projects/*/locations/*/lakes/*}/tasks:\x04task\x12\xcd\x01\n\nUpdateTask\x12+.google.cloud.dataplex.v1.UpdateTaskRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x19\n\x04Task\x12\x11OperationMetadata\xda\x41\x10task,update_mask\x82\xd3\xe4\x93\x02>26/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}:\x04task\x12\xc7\x01\n\nDeleteTask\x12+.google.cloud.dataplex.v1.DeleteTaskRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/lakes/*/tasks/*}\x12\xa8\x01\n\tListTasks\x12*.google.cloud.dataplex.v1.ListTasksRequest\x1a+.google.cloud.dataplex.v1.ListTasksResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*/lakes/*}/tasks\x12\x95\x01\n\x07GetTask\x12(.google.cloud.dataplex.v1.GetTaskRequest\x1a\x1e.google.cloud.dataplex.v1.Task\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/lakes/*/tasks/*}\x12\xac\x01\n\x08ListJobs\x12).google.cloud.dataplex.v1.ListJobsRequest\x1a*.google.cloud.dataplex.v1.ListJobsResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs\x12\xa7\x01\n\x07RunTask\x12(.google.cloud.dataplex.v1.RunTaskRequest\x1a).google.cloud.dataplex.v1.RunTaskResponse\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run:\x01*\x12\x99\x01\n\x06GetJob\x12\'.google.cloud.dataplex.v1.GetJobRequest\x1a\x1d.google.cloud.dataplex.v1.Job\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}\x12\xa2\x01\n\tCancelJob\x12*.google.cloud.dataplex.v1.CancelJobRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\"?/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel:\x01*\x12\xfd\x01\n\x11\x43reateEnvironment\x12\x32.google.cloud.dataplex.v1.CreateEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41 \n\x0b\x45nvironment\x12\x11OperationMetadata\xda\x41!parent,environment,environment_id\x82\xd3\xe4\x93\x02G\"8/v1/{parent=projects/*/locations/*/lakes/*}/environments:\x0b\x65nvironment\x12\xff\x01\n\x11UpdateEnvironment\x12\x32.google.cloud.dataplex.v1.UpdateEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41 \n\x0b\x45nvironment\x12\x11OperationMetadata\xda\x41\x17\x65nvironment,update_mask\x82\xd3\xe4\x93\x02S2D/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}:\x0b\x65nvironment\x12\xdc\x01\n\x11\x44\x65leteEnvironment\x12\x32.google.cloud.dataplex.v1.DeleteEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/lakes/*/environments/*}\x12\xc4\x01\n\x10ListEnvironments\x12\x31.google.cloud.dataplex.v1.ListEnvironmentsRequest\x1a\x32.google.cloud.dataplex.v1.ListEnvironmentsResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/lakes/*}/environments\x12\xb1\x01\n\x0eGetEnvironment\x12/.google.cloud.dataplex.v1.GetEnvironmentRequest\x1a%.google.cloud.dataplex.v1.Environment\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/lakes/*/environments/*}\x12\xc3\x01\n\x0cListSessions\x12-.google.cloud.dataplex.v1.ListSessionsRequest\x1a..google.cloud.dataplex.v1.ListSessionsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBh\n\x1c\x63om.google.cloud.dataplex.v1B\x0cServiceProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.dataplex.v1.Lake", "google/cloud/dataplex/v1/resources.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.dataplex.v1.Task", "google/cloud/dataplex/v1/tasks.proto"], - ["google.cloud.dataplex.v1.Environment", "google/cloud/dataplex/v1/analyze.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - CreateLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateLakeRequest").msgclass - UpdateLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateLakeRequest").msgclass - DeleteLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteLakeRequest").msgclass - ListLakesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakesRequest").msgclass - ListLakesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakesResponse").msgclass - ListLakeActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakeActionsRequest").msgclass - ListActionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListActionsResponse").msgclass - GetLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetLakeRequest").msgclass - CreateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateZoneRequest").msgclass - UpdateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateZoneRequest").msgclass - DeleteZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteZoneRequest").msgclass - ListZonesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZonesRequest").msgclass - ListZonesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZonesResponse").msgclass - ListZoneActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZoneActionsRequest").msgclass - GetZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetZoneRequest").msgclass - CreateAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateAssetRequest").msgclass - UpdateAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateAssetRequest").msgclass - DeleteAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteAssetRequest").msgclass - ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetsRequest").msgclass - ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetsResponse").msgclass - ListAssetActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetActionsRequest").msgclass - GetAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetAssetRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.OperationMetadata").msgclass - CreateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateTaskRequest").msgclass - UpdateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateTaskRequest").msgclass - DeleteTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteTaskRequest").msgclass - ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListTasksRequest").msgclass - ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListTasksResponse").msgclass - GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetTaskRequest").msgclass - GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetJobRequest").msgclass - RunTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunTaskRequest").msgclass - RunTaskResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunTaskResponse").msgclass - ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListJobsRequest").msgclass - ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListJobsResponse").msgclass - CancelJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CancelJobRequest").msgclass - CreateEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEnvironmentRequest").msgclass - UpdateEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEnvironmentRequest").msgclass - DeleteEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEnvironmentRequest").msgclass - ListEnvironmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEnvironmentsRequest").msgclass - ListEnvironmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEnvironmentsResponse").msgclass - GetEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEnvironmentRequest").msgclass - ListSessionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListSessionsRequest").msgclass - ListSessionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListSessionsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb deleted file mode 100644 index c07e2ea39d8e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb +++ /dev/null @@ -1,117 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/service.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# - -require 'grpc' -require 'google/cloud/dataplex/v1/service_pb' - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - # 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 Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.DataplexService' - - # Creates a lake resource. - rpc :CreateLake, ::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Google::Longrunning::Operation - # Updates a lake resource. - rpc :UpdateLake, ::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Google::Longrunning::Operation - # Deletes a lake resource. All zones within the lake must be deleted before - # the lake can be deleted. - rpc :DeleteLake, ::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Google::Longrunning::Operation - # Lists lake resources in a project and location. - rpc :ListLakes, ::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Google::Cloud::Dataplex::V1::ListLakesResponse - # Retrieves a lake resource. - rpc :GetLake, ::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Google::Cloud::Dataplex::V1::Lake - # Lists action resources in a lake. - rpc :ListLakeActions, ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse - # Creates a zone resource within a lake. - rpc :CreateZone, ::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Google::Longrunning::Operation - # Updates a zone resource. - rpc :UpdateZone, ::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Google::Longrunning::Operation - # Deletes a zone resource. All assets within a zone must be deleted before - # the zone can be deleted. - rpc :DeleteZone, ::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Google::Longrunning::Operation - # Lists zone resources in a lake. - rpc :ListZones, ::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Google::Cloud::Dataplex::V1::ListZonesResponse - # Retrieves a zone resource. - rpc :GetZone, ::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Google::Cloud::Dataplex::V1::Zone - # Lists action resources in a zone. - rpc :ListZoneActions, ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse - # Creates an asset resource. - rpc :CreateAsset, ::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Google::Longrunning::Operation - # Updates an asset resource. - rpc :UpdateAsset, ::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Google::Longrunning::Operation - # Deletes an asset resource. The referenced storage resource is detached - # (default) or deleted based on the associated Lifecycle policy. - rpc :DeleteAsset, ::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Google::Longrunning::Operation - # Lists asset resources in a zone. - rpc :ListAssets, ::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Google::Cloud::Dataplex::V1::ListAssetsResponse - # Retrieves an asset resource. - rpc :GetAsset, ::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Google::Cloud::Dataplex::V1::Asset - # Lists action resources in an asset. - rpc :ListAssetActions, ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse - # Creates a task resource within a lake. - rpc :CreateTask, ::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Google::Longrunning::Operation - # Update the task resource. - rpc :UpdateTask, ::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Google::Longrunning::Operation - # Delete the task resource. - rpc :DeleteTask, ::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Google::Longrunning::Operation - # Lists tasks under the given lake. - rpc :ListTasks, ::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Google::Cloud::Dataplex::V1::ListTasksResponse - # Get task resource. - rpc :GetTask, ::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Google::Cloud::Dataplex::V1::Task - # Lists Jobs under the given task. - rpc :ListJobs, ::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Google::Cloud::Dataplex::V1::ListJobsResponse - # Run an on demand execution of a Task. - rpc :RunTask, ::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Google::Cloud::Dataplex::V1::RunTaskResponse - # Get job resource. - rpc :GetJob, ::Google::Cloud::Dataplex::V1::GetJobRequest, ::Google::Cloud::Dataplex::V1::Job - # Cancel jobs running for the task resource. - rpc :CancelJob, ::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Google::Protobuf::Empty - # Create an environment resource. - rpc :CreateEnvironment, ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, ::Google::Longrunning::Operation - # Update the environment resource. - rpc :UpdateEnvironment, ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, ::Google::Longrunning::Operation - # Delete the environment resource. All the child resources must have been - # deleted before environment deletion can be initiated. - rpc :DeleteEnvironment, ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, ::Google::Longrunning::Operation - # Lists environments under the given lake. - rpc :ListEnvironments, ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse - # Get environment resource. - rpc :GetEnvironment, ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, ::Google::Cloud::Dataplex::V1::Environment - # Lists session resources in an environment. - rpc :ListSessions, ::Google::Cloud::Dataplex::V1::ListSessionsRequest, ::Google::Cloud::Dataplex::V1::ListSessionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb deleted file mode 100644 index 81b3556fdcdd..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/tasks.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/resources_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n$google/cloud/dataplex/v1/tasks.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x16\n\x04Task\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x07 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x08 \x03(\x0b\x32*.google.cloud.dataplex.v1.Task.LabelsEntryB\x03\xe0\x41\x01\x12\x45\n\x0ctrigger_spec\x18\x64 \x01(\x0b\x32*.google.cloud.dataplex.v1.Task.TriggerSpecB\x03\xe0\x41\x02\x12I\n\x0e\x65xecution_spec\x18\x65 \x01(\x0b\x32,.google.cloud.dataplex.v1.Task.ExecutionSpecB\x03\xe0\x41\x02\x12N\n\x10\x65xecution_status\x18\xc9\x01 \x01(\x0b\x32..google.cloud.dataplex.v1.Task.ExecutionStatusB\x03\xe0\x41\x03\x12@\n\x05spark\x18\xac\x02 \x01(\x0b\x32..google.cloud.dataplex.v1.Task.SparkTaskConfigH\x00\x12\x46\n\x08notebook\x18\xae\x02 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.NotebookTaskConfigH\x00\x1a\x9a\x06\n\x12InfrastructureSpec\x12X\n\x05\x62\x61tch\x18\x34 \x01(\x0b\x32G.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResourcesH\x00\x12\x62\n\x0f\x63ontainer_image\x18\x65 \x01(\x0b\x32G.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntimeH\x01\x12T\n\x0bvpc_network\x18\x96\x01 \x01(\x0b\x32<.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetworkH\x02\x1aW\n\x15\x42\x61tchComputeResources\x12\x1c\n\x0f\x65xecutors_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12 \n\x13max_executors_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a\x86\x02\n\x15\x43ontainerImageRuntime\x12\x12\n\x05image\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tjava_jars\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fpython_packages\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12p\n\nproperties\x18\x04 \x03(\x0b\x32W.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.PropertiesEntryB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\nVpcNetwork\x12\x16\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1a\n\x0bsub_network\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\x0cnetwork_tags\x18\x03 \x03(\tB\x03\xe0\x41\x01\x42\x0e\n\x0cnetwork_nameB\x0b\n\tresourcesB\t\n\x07runtimeB\t\n\x07network\x1a\x9a\x02\n\x0bTriggerSpec\x12\x45\n\x04type\x18\x05 \x01(\x0e\x32/.google.cloud.dataplex.v1.Task.TriggerSpec.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x33\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_retries\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\x64 \x01(\tB\x03\xe0\x41\x01H\x00\":\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\r\n\tRECURRING\x10\x02\x42\t\n\x07trigger\x1a\x95\x02\n\rExecutionSpec\x12I\n\x04\x61rgs\x18\x04 \x03(\x0b\x32\x36.google.cloud.dataplex.v1.Task.ExecutionSpec.ArgsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07project\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x1amax_job_execution_lifetime\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x14\n\x07kms_key\x18\t \x01(\tB\x03\xe0\x41\x01\x1a+\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xa5\x02\n\x0fSparkTaskConfig\x12\x1b\n\x11main_jar_file_uri\x18\x64 \x01(\tH\x00\x12\x14\n\nmain_class\x18\x65 \x01(\tH\x00\x12\x1c\n\x12python_script_file\x18\x66 \x01(\tH\x00\x12\x19\n\x0fsql_script_file\x18h \x01(\tH\x00\x12\x14\n\nsql_script\x18i \x01(\tH\x00\x12\x16\n\tfile_uris\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61rchive_uris\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12S\n\x13infrastructure_spec\x18\x06 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.InfrastructureSpecB\x03\xe0\x41\x01\x42\x08\n\x06\x64river\x1a\xb3\x01\n\x12NotebookTaskConfig\x12\x15\n\x08notebook\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12S\n\x13infrastructure_spec\x18\x03 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.InfrastructureSpecB\x03\xe0\x41\x01\x12\x16\n\tfile_uris\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61rchive_uris\x18\x06 \x03(\tB\x03\xe0\x41\x01\x1a\x7f\n\x0f\x45xecutionStatus\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\nlatest_job\x18\t \x01(\x0b\x32\x1d.google.cloud.dataplex.v1.JobB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:d\xea\x41\x61\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x41projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}B\x08\n\x06\x63onfig\"\xc5\x07\n\x03Job\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x03\xfa\x41\x1d\n\x1b\x64\x61taplex.googleapis.com/Job\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x05state\x18\x05 \x01(\x0e\x32#.google.cloud.dataplex.v1.Job.StateB\x03\xe0\x41\x03\x12\x18\n\x0bretry_count\x18\x06 \x01(\rB\x03\xe0\x41\x03\x12;\n\x07service\x18\x07 \x01(\x0e\x32%.google.cloud.dataplex.v1.Job.ServiceB\x03\xe0\x41\x03\x12\x18\n\x0bservice_job\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\t \x01(\tB\x03\xe0\x41\x03\x12>\n\x06labels\x18\n \x03(\x0b\x32).google.cloud.dataplex.v1.Job.LabelsEntryB\x03\xe0\x41\x03\x12;\n\x07trigger\x18\x0b \x01(\x0e\x32%.google.cloud.dataplex.v1.Job.TriggerB\x03\xe0\x41\x03\x12I\n\x0e\x65xecution_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.Task.ExecutionSpecB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"0\n\x07Service\x12\x17\n\x13SERVICE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TAPROC\x10\x01\"r\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0e\n\nCANCELLING\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0b\n\x07\x41\x42ORTED\x10\x06\"D\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTASK_CONFIG\x10\x01\x12\x0f\n\x0bRUN_REQUEST\x10\x02:n\xea\x41k\n\x1b\x64\x61taplex.googleapis.com/Job\x12Lprojects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}Bf\n\x1c\x63om.google.cloud.dataplex.v1B\nTasksProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task").msgclass - Task::InfrastructureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec").msgclass - Task::InfrastructureSpec::BatchComputeResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources").msgclass - Task::InfrastructureSpec::ContainerImageRuntime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime").msgclass - Task::InfrastructureSpec::VpcNetwork = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork").msgclass - Task::TriggerSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.TriggerSpec").msgclass - Task::TriggerSpec::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.TriggerSpec.Type").enummodule - Task::ExecutionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.ExecutionSpec").msgclass - Task::SparkTaskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.SparkTaskConfig").msgclass - Task::NotebookTaskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.NotebookTaskConfig").msgclass - Task::ExecutionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.ExecutionStatus").msgclass - Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job").msgclass - Job::Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.Service").enummodule - Job::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.State").enummodule - Job::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.Trigger").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb deleted file mode 100644 index 5ab8544710fa..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md deleted file mode 100644 index b4aad34dcd67..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Dataplex V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 934c39849a6a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,399 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: - # seconds: 60 # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: - # seconds: 360 # 6 minutes - # total_poll_timeout: - # seconds: 54000 # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index b03587481349..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 38b4b61e6061..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 6497ebc78dc1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same - # concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb deleted file mode 100644 index eda6a23185b7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb +++ /dev/null @@ -1,290 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # Environment represents a user-visible compute infrastructure for analytics - # within a lake. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the environment, of the form: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/environment/\\{environment_id} - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Environment creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the environment was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined labels for the environment. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the environment. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the environment. - # @!attribute [rw] infrastructure_spec - # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec] - # Required. Infrastructure specification for the Environment. - # @!attribute [rw] session_spec - # @return [::Google::Cloud::Dataplex::V1::Environment::SessionSpec] - # Optional. Configuration for sessions created for this environment. - # @!attribute [r] session_status - # @return [::Google::Cloud::Dataplex::V1::Environment::SessionStatus] - # Output only. Status of sessions created for this environment. - # @!attribute [r] endpoints - # @return [::Google::Cloud::Dataplex::V1::Environment::Endpoints] - # Output only. URI Endpoints to access sessions associated with the - # Environment. - class Environment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for the underlying infrastructure used to run workloads. - # @!attribute [rw] compute - # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec::ComputeResources] - # Optional. Compute resources needed for analyze interactive workloads. - # @!attribute [rw] os_image - # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec::OsImageRuntime] - # Required. Software Runtime Configuration for analyze interactive - # workloads. - class InfrastructureSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Compute resources associated with the analyze interactive workloads. - # @!attribute [rw] disk_size_gb - # @return [::Integer] - # Optional. Size in GB of the disk. Default is 100 GB. - # @!attribute [rw] node_count - # @return [::Integer] - # Optional. Total number of nodes in the sessions created for this - # environment. - # @!attribute [rw] max_node_count - # @return [::Integer] - # Optional. Max configurable nodes. - # If max_node_count > node_count, then auto-scaling is enabled. - class ComputeResources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Software Runtime Configuration to run Analyze. - # @!attribute [rw] image_version - # @return [::String] - # Required. Dataplex Image version. - # @!attribute [rw] java_libraries - # @return [::Array<::String>] - # 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 - # @!attribute [rw] python_packages - # @return [::Array<::String>] - # 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 - # @!attribute [rw] properties - # @return [::Google::Protobuf::Map{::String => ::String}] - # 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". - class OsImageRuntime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class PropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Configuration for sessions created for this environment. - # @!attribute [rw] max_idle_duration - # @return [::Google::Protobuf::Duration] - # Optional. The idle time configuration of the session. The session will be - # auto-terminated at the end of this period. - # @!attribute [rw] enable_fast_startup - # @return [::Boolean] - # 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. - class SessionSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of sessions created for this environment. - # @!attribute [r] active - # @return [::Boolean] - # Output only. Queries over sessions to mark whether the environment is - # currently active or not - class SessionStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # URI Endpoints to access sessions associated with the Environment. - # @!attribute [r] notebooks - # @return [::String] - # Output only. URI to serve notebook APIs - # @!attribute [r] sql - # @return [::String] - # Output only. URI to serve SQL APIs - class Endpoints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Content represents a user-visible notebook or a sql script - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the content, of the form: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [rw] path - # @return [::String] - # Required. The path for the Content file, represented as directory - # structure. Unique within a lake. Limited to alphanumerics, hyphens, - # underscores, dots and slashes. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Content creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the content was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined labels for the content. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the content. - # @!attribute [rw] data_text - # @return [::String] - # Required. Content data in string format. - # @!attribute [rw] sql_script - # @return [::Google::Cloud::Dataplex::V1::Content::SqlScript] - # Sql Script related configurations. - # @!attribute [rw] notebook - # @return [::Google::Cloud::Dataplex::V1::Content::Notebook] - # Notebook related configurations. - class Content - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for the Sql Script content. - # @!attribute [rw] engine - # @return [::Google::Cloud::Dataplex::V1::Content::SqlScript::QueryEngine] - # Required. Query Engine to be used for the Sql Query. - class SqlScript - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Query Engine Type of the SQL Script. - module QueryEngine - # Value was unspecified. - QUERY_ENGINE_UNSPECIFIED = 0 - - # Spark SQL Query. - SPARK = 2 - end - end - - # Configuration for Notebook content. - # @!attribute [rw] kernel_type - # @return [::Google::Cloud::Dataplex::V1::Content::Notebook::KernelType] - # Required. Kernel Type of the notebook. - class Notebook - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Kernel Type of the Jupyter notebook. - module KernelType - # Kernel Type unspecified. - KERNEL_TYPE_UNSPECIFIED = 0 - - # Python 3 Kernel. - PYTHON3 = 1 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Represents an active analyze session running for a user. - # @!attribute [r] name - # @return [::String] - # 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} - # @!attribute [r] user_id - # @return [::String] - # Output only. Email of user running the session. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Session start time. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. State of Session - class Session - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb deleted file mode 100644 index aca578b5e853..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb +++ /dev/null @@ -1,1092 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # Aspect Type is a template for creating Aspects, and represents the - # JSON-schema for a given Entry, e.g., BigQuery Table Schema. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the AspectType, of the form: - # projects/\\{project_number}/locations/\\{location_id}/aspectTypes/\\{aspect_type_id}. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the AspectType was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the AspectType was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the AspectType. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the AspectType. - # @!attribute [rw] etag - # @return [::String] - # 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. - # @!attribute [rw] authorization - # @return [::Google::Cloud::Dataplex::V1::AspectType::Authorization] - # Immutable. Authorization defined for this type. - # @!attribute [rw] metadata_template - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] - # Required. MetadataTemplate of the aspect. - # @!attribute [r] transfer_status - # @return [::Google::Cloud::Dataplex::V1::TransferStatus] - # Output only. Denotes the transfer status of the Aspect Type. It is - # unspecified for Aspect Types created from Dataplex API. - class AspectType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Autorization for an Aspect Type. - # @!attribute [rw] alternate_use_permission - # @return [::String] - # 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. - class Authorization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # MetadataTemplate definition for AspectType - # @!attribute [rw] index - # @return [::Integer] - # 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. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the field. - # @!attribute [rw] type - # @return [::String] - # 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). - # @!attribute [rw] record_fields - # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate>] - # Optional. Field definition, needs to be specified if the type is record. - # Defines the nested fields. - # @!attribute [rw] enum_values - # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::EnumValue>] - # Optional. The list of values for an enum type. Needs to be defined if the - # type is enum. - # @!attribute [rw] map_items - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] - # 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 - # MetadataTemplate. The recommended value for the name field is item, as - # this is not used in the actual payload. - # @!attribute [rw] array_items - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] - # 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. - # @!attribute [rw] type_id - # @return [::String] - # 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. - # @!attribute [rw] type_ref - # @return [::String] - # Optional. A reference to another field definition (instead of 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 - # refer to other fields. - # @!attribute [rw] constraints - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::Constraints] - # Optional. Specifies the constraints on this field. - # @!attribute [rw] annotations - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::Annotations] - # Optional. Specifies annotations on this field. - class MetadataTemplate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Definition of Enumvalue (to be used by enum fields) - # @!attribute [rw] index - # @return [::Integer] - # Required. Index for the enum. Cannot be modified. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the enumvalue. This is the actual value that the - # aspect will contain. - # @!attribute [rw] deprecated - # @return [::String] - # Optional. Optional deprecation message to be set if an enum value needs - # to be deprecated. - class EnumValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Definition of the constraints of a field - # @!attribute [rw] required - # @return [::Boolean] - # Optional. Marks this as an optional/required field. - class Constraints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Definition of the annotations of a field - # @!attribute [rw] deprecated - # @return [::String] - # Optional. Marks a field as deprecated, a deprecation message can be - # included. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Specify a displayname for a field. - # @!attribute [rw] description - # @return [::String] - # Optional. Specify a description for a field - # @!attribute [rw] display_order - # @return [::Integer] - # Optional. Specify a display order for a field. Display order can be - # used to reorder where a field is rendered - # @!attribute [rw] string_type - # @return [::String] - # 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. - # @!attribute [rw] string_values - # @return [::Array<::String>] - # Optional. Suggested hints for string fields. These can be used to - # suggest values to users, through an UI for example. - class Annotations - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An Entry Group represents a logical grouping of one or more Entries. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the EntryGroup, of the form: - # projects/\\{project_number}/locations/\\{location_id}/entryGroups/\\{entry_group_id}. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the EntryGroup was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the EntryGroup was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the EntryGroup. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the EntryGroup. - # @!attribute [rw] etag - # @return [::String] - # 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. - # @!attribute [r] transfer_status - # @return [::Google::Cloud::Dataplex::V1::TransferStatus] - # Output only. Denotes the transfer status of the Entry Group. It is - # unspecified for Entry Group created from Dataplex API. - class EntryGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Entry Type is a template for creating Entries. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the EntryType, of the form: - # projects/\\{project_number}/locations/\\{location_id}/entryTypes/\\{entry_type_id}. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the EntryType was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the EntryType was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the EntryType. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the EntryType. - # @!attribute [rw] etag - # @return [::String] - # 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. - # @!attribute [rw] type_aliases - # @return [::Array<::String>] - # Optional. Indicates the class this Entry Type belongs to, for example, - # TABLE, DATABASE, MODEL. - # @!attribute [rw] platform - # @return [::String] - # Optional. The platform that Entries of this type belongs to. - # @!attribute [rw] system - # @return [::String] - # Optional. The system that Entries of this type belongs to. Examples include - # CloudSQL, MariaDB etc - # @!attribute [rw] required_aspects - # @return [::Array<::Google::Cloud::Dataplex::V1::EntryType::AspectInfo>] - # AspectInfo for the entry type. - # @!attribute [rw] authorization - # @return [::Google::Cloud::Dataplex::V1::EntryType::Authorization] - # Immutable. Authorization defined for this type. - class EntryType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] type - # @return [::String] - # Required aspect type for the entry type. - class AspectInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Authorization for an Entry Type. - # @!attribute [rw] alternate_use_permission - # @return [::String] - # 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. - class Authorization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An aspect is a single piece of metadata describing an entry. - # @!attribute [r] aspect_type - # @return [::String] - # Output only. The resource name of the type used to create this Aspect. - # @!attribute [r] path - # @return [::String] - # Output only. The path in the entry under which the aspect is attached. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Aspect was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Aspect was last updated. - # @!attribute [rw] data - # @return [::Google::Protobuf::Struct] - # 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). - # @!attribute [rw] aspect_source - # @return [::Google::Cloud::Dataplex::V1::AspectSource] - class Aspect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AspectSource contains source system related information for the - # aspect. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The create time of the aspect in the source system. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The update time of the aspect in the source system. - class AspectSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An entry is a representation of a data asset which can be described by - # various metadata. - # @!attribute [rw] name - # @return [::String] - # Identifier. The relative resource name of the Entry, of the form: - # projects/\\{project}/locations/\\{location}/entryGroups/\\{entry_group}/entries/\\{entry}. - # @!attribute [rw] entry_type - # @return [::String] - # Required. Immutable. The resource name of the EntryType used to create this - # Entry. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Entry was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Entry was last updated. - # @!attribute [rw] aspects - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Dataplex::V1::Aspect}] - # 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) - # @!attribute [rw] parent_entry - # @return [::String] - # Optional. Immutable. The resource name of the parent entry. - # @!attribute [rw] fully_qualified_name - # @return [::String] - # Optional. A name for the entry that can reference it in an external system. - # The maximum size of the field is 4000 characters. - # @!attribute [rw] entry_source - # @return [::Google::Cloud::Dataplex::V1::EntrySource] - # Optional. Source system related information for an entry. - class Entry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Dataplex::V1::Aspect] - class AspectsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # EntrySource contains source system related information for the - # entry. - # @!attribute [rw] resource - # @return [::String] - # The name of the resource in the source system. - # The maximum size of the field is 4000 characters. - # @!attribute [rw] system - # @return [::String] - # The name of the source system. - # The maximum size of the field is 64 characters. - # @!attribute [rw] platform - # @return [::String] - # The platform containing the source system. - # The maximum size of the field is 64 characters. - # @!attribute [rw] display_name - # @return [::String] - # User friendly display name. - # The maximum size of the field is 500 characters. - # @!attribute [rw] description - # @return [::String] - # Description of the Entry. - # The maximum size of the field is 2000 characters. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # User-defined labels. - # The maximum size of keys and values is 128 characters each. - # @!attribute [rw] ancestors - # @return [::Array<::Google::Cloud::Dataplex::V1::EntrySource::Ancestor>] - # Immutable. The ancestors of the Entry in the source system. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The create time of the resource in the source system. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The update time of the resource in the source system. - class EntrySource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Ancestor contains information about individual items in the hierarchy of - # an Entry. - # @!attribute [rw] name - # @return [::String] - # Optional. The name of the ancestor resource. - # @!attribute [rw] type - # @return [::String] - # Optional. The type of the ancestor resource. - class Ancestor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Create EntryGroup Request - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the entryGroup, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a GCP region. - # @!attribute [rw] entry_group_id - # @return [::String] - # Required. EntryGroup identifier. - # @!attribute [rw] entry_group - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # Required. EntryGroup Resource - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateEntryGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update EntryGroup Request - # @!attribute [rw] entry_group - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # Required. EntryGroup Resource - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateEntryGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delele EntryGroup Request - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryGroupRequest method returns an ABORTED error response - class DeleteEntryGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List entryGroups request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListEntryGroupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List ListEntryGroups response. - # @!attribute [rw] entry_groups - # @return [::Array<::Google::Cloud::Dataplex::V1::EntryGroup>] - # ListEntryGroups under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListEntryGroupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get EntryGroup request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - class GetEntryGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create EntryType Request - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the EntryType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a GCP region. - # @!attribute [rw] entry_type_id - # @return [::String] - # Required. EntryType identifier. - # @!attribute [rw] entry_type - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # Required. EntryType Resource - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateEntryTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update EntryType Request - # @!attribute [rw] entry_type - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # Required. EntryType Resource - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateEntryTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delele EntryType Request - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryTypeRequest method returns an ABORTED error response - class DeleteEntryTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List EntryTypes request - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - class ListEntryTypesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List EntryTypes response - # @!attribute [rw] entry_types - # @return [::Array<::Google::Cloud::Dataplex::V1::EntryType>] - # ListEntryTypes under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListEntryTypesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get EntryType request - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - class GetEntryTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create AspectType Request - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the AspectType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a GCP region. - # @!attribute [rw] aspect_type_id - # @return [::String] - # Required. AspectType identifier. - # @!attribute [rw] aspect_type - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # Required. AspectType Resource - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateAspectTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update AspectType Request - # @!attribute [rw] aspect_type - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # Required. AspectType Resource - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateAspectTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delele AspectType Request - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteAspectTypeRequest method returns an ABORTED error response - class DeleteAspectTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List AspectTypes request - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - class ListAspectTypesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List AspectTypes response - # @!attribute [rw] aspect_types - # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType>] - # ListAspectTypes under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListAspectTypesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get AspectType request - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - class GetAspectTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @!attribute [rw] entry_id - # @return [::String] - # 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 - # `//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 - # Cloud. - # - # The maximum size of the field is 4000 characters. - # @!attribute [rw] entry - # @return [::Google::Cloud::Dataplex::V1::Entry] - # Required. Entry resource. - class CreateEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] entry - # @return [::Google::Cloud::Dataplex::V1::Entry] - # Required. Entry resource. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # 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. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true and the entry does not exist, it will be created. - # @!attribute [rw] delete_missing_aspects - # @return [::Boolean] - # 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. - # @!attribute [rw] aspect_keys - # @return [::Array<::String>] - # 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 - # `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. - class UpdateEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - class DeleteEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @!attribute [rw] page_size - # @return [::Integer] - # @!attribute [rw] page_token - # @return [::String] - # Optional. The pagination token returned by a previous request. - # @!attribute [rw] filter - # @return [::String] - # 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" - class ListEntriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] entries - # @return [::Array<::Google::Cloud::Dataplex::V1::Entry>] - # The list of entries. - # @!attribute [rw] next_page_token - # @return [::String] - # Pagination token. - class ListEntriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View for controlling which parts of an entry are to be returned. - # @!attribute [rw] aspect_types - # @return [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # Only works if the CUSTOM view is selected. - # @!attribute [rw] paths - # @return [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. Only works if the CUSTOM view is selected. - class GetEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/{location}`. - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View for controlling which parts of an entry are to be returned. - # @!attribute [rw] aspect_types - # @return [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # Only works if the CUSTOM view is selected. - # @!attribute [rw] paths - # @return [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. Only works if the CUSTOM view is selected. - # @!attribute [rw] entry - # @return [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - class LookupEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/{location}`. - # @!attribute [rw] query - # @return [::String] - # Required. The query against which entries in scope should be matched. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Pagination. - # @!attribute [rw] page_token - # @return [::String] - # @!attribute [rw] order_by - # @return [::String] - # Optional. Ordering of the results. Supported options to be added later. - # @!attribute [rw] scope - # @return [::String] - # 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. - class SearchEntriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single result of a SearchEntries request. - # @!attribute [rw] linked_resource - # @return [::String] - # Linked resource name. - # @!attribute [rw] dataplex_entry - # @return [::Google::Cloud::Dataplex::V1::Entry] - # Entry format of the result. - # @!attribute [rw] snippets - # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResult::Snippets] - # Snippets. - class SearchEntriesResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Snippets for the entry, contains HTML-style highlighting for - # matched tokens, will be used in UI. - # @!attribute [rw] dataplex_entry - # @return [::Google::Cloud::Dataplex::V1::Entry] - # Entry - class Snippets - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] - # The results matching the search query. - # @!attribute [rw] total_size - # @return [::Integer] - # The estimated total number of matching entries. Not guaranteed to be - # accurate. - # @!attribute [rw] next_page_token - # @return [::String] - # Pagination token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable locations. Search results don't include data from those - # locations. - class SearchEntriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # View for controlling which parts of an entry are to be returned. - module 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 would exceed 100, the first 100 will be returned. - CUSTOM = 3 - - # Returns all aspects. If the number of aspects would exceed 100, the first - # 100 will be returned. - ALL = 4 - end - - # Denotes the transfer status of a resource. It is unspecified for resources - # created from Dataplex API. - module 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 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb deleted file mode 100644 index 9fdc543e77b4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # Create content request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} - # @!attribute [rw] content - # @return [::Google::Cloud::Dataplex::V1::Content] - # Required. Content resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateContentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update content request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] content - # @return [::Google::Cloud::Dataplex::V1::Content] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateContentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete content request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - class DeleteContentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List content request. Returns the BASIC Content view. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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. - class ListContentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List content response. - # @!attribute [rw] content - # @return [::Array<::Google::Cloud::Dataplex::V1::Content>] - # Content under the given parent lake. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListContentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get content request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView] - # Optional. Specify content view to make a partial request. - class GetContentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies whether the request should return the full or the partial - # representation. - module 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 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb deleted file mode 100644 index 51cdbb703b14..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb +++ /dev/null @@ -1,321 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # DataProfileScan related setting. - # @!attribute [rw] sampling_percent - # @return [::Float] - # 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. - # @!attribute [rw] row_filter - # @return [::String] - # 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 - # @!attribute [rw] post_scan_actions - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::PostScanActions] - # Optional. Actions to take upon job completion.. - # @!attribute [rw] include_fields - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::SelectedFields] - # 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`. - # @!attribute [rw] exclude_fields - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::SelectedFields] - # Optional. The fields to exclude from data profile. - # - # If specified, the fields will be excluded from data profile, regardless of - # `include_fields` value. - class DataProfileSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration of post scan actions of DataProfileScan job. - # @!attribute [rw] bigquery_export - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::PostScanActions::BigQueryExport] - # Optional. If set, results will be exported to the provided BigQuery - # table. - class PostScanActions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration of BigQuery export post scan action. - # @!attribute [rw] results_table - # @return [::String] - # Optional. The BigQuery table to export DataProfileScan results to. - # Format: - # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - class BigQueryExport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The specification for fields to include or exclude in data profile scan. - # @!attribute [rw] field_names - # @return [::Array<::String>] - # 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'. - class SelectedFields - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # DataProfileResult defines the output of DataProfileScan. Each field of the - # table will have field type specific profile result. - # @!attribute [rw] row_count - # @return [::Integer] - # The count of rows scanned. - # @!attribute [rw] profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile] - # The profile information per field. - # @!attribute [rw] scanned_data - # @return [::Google::Cloud::Dataplex::V1::ScannedData] - # The data scanned for this result. - # @!attribute [r] post_scan_actions_result - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult] - # Output only. The result of post scan actions. - class DataProfileResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Contains name, type, mode and field type specific profile information. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field>] - # List of fields with structural and profile information for each field. - class Profile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A field within a table. - # @!attribute [rw] name - # @return [::String] - # The name of the field. - # @!attribute [rw] type - # @return [::String] - # 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). - # @!attribute [rw] mode - # @return [::String] - # 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. - # @!attribute [rw] profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo] - # Profile information for the corresponding field. - class Field - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The profile information for each field type. - # @!attribute [rw] null_ratio - # @return [::Float] - # Ratio of rows with null value against total scanned rows. - # @!attribute [rw] distinct_ratio - # @return [::Float] - # Ratio of rows with distinct values against total scanned rows. - # Not available for complex non-groupable field type RECORD and fields - # with REPEATABLE mode. - # @!attribute [rw] top_n_values - # @return [::Array<::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::TopNValue>] - # 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. - # @!attribute [rw] string_profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::StringFieldInfo] - # String type field information. - # @!attribute [rw] integer_profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::IntegerFieldInfo] - # Integer type field information. - # @!attribute [rw] double_profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::DoubleFieldInfo] - # Double type field information. - class ProfileInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The profile information for a string type field. - # @!attribute [rw] min_length - # @return [::Integer] - # Minimum length of non-null values in the scanned data. - # @!attribute [rw] max_length - # @return [::Integer] - # Maximum length of non-null values in the scanned data. - # @!attribute [rw] average_length - # @return [::Float] - # Average length of non-null values in the scanned data. - class StringFieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The profile information for an integer type field. - # @!attribute [rw] average - # @return [::Float] - # Average of non-null values in the scanned data. NaN, if the field - # has a NaN. - # @!attribute [rw] standard_deviation - # @return [::Float] - # Standard deviation of non-null values in the scanned data. NaN, if - # the field has a NaN. - # @!attribute [rw] min - # @return [::Integer] - # Minimum of non-null values in the scanned data. NaN, if the field - # has a NaN. - # @!attribute [rw] quartiles - # @return [::Array<::Integer>] - # 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. - # @!attribute [rw] max - # @return [::Integer] - # Maximum of non-null values in the scanned data. NaN, if the field - # has a NaN. - class IntegerFieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The profile information for a double type field. - # @!attribute [rw] average - # @return [::Float] - # Average of non-null values in the scanned data. NaN, if the field - # has a NaN. - # @!attribute [rw] standard_deviation - # @return [::Float] - # Standard deviation of non-null values in the scanned data. NaN, if - # the field has a NaN. - # @!attribute [rw] min - # @return [::Float] - # Minimum of non-null values in the scanned data. NaN, if the field - # has a NaN. - # @!attribute [rw] quartiles - # @return [::Array<::Float>] - # 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. - # @!attribute [rw] max - # @return [::Float] - # Maximum of non-null values in the scanned data. NaN, if the field - # has a NaN. - class DoubleFieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Top N non-null values in the scanned data. - # @!attribute [rw] value - # @return [::String] - # String value of a top N non-null value. - # @!attribute [rw] count - # @return [::Integer] - # Count of the corresponding value in the scanned data. - # @!attribute [rw] ratio - # @return [::Float] - # Ratio of the corresponding value in the field against the total - # number of rows in the scanned data. - class TopNValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - - # The result of post scan actions of DataProfileScan job. - # @!attribute [r] bigquery_export_result - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult::BigQueryExportResult] - # Output only. The result of BigQuery export post scan action. - class PostScanActionsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of BigQuery export post scan action. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult::BigQueryExportResult::State] - # Output only. Execution state for the BigQuery exporting. - # @!attribute [r] message - # @return [::String] - # Output only. Additional information about the BigQuery exporting. - class BigQueryExportResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution state for the exporting. - module 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 - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb deleted file mode 100644 index ee7c3444912d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb +++ /dev/null @@ -1,540 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # DataQualityScan related setting. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRule>] - # Required. The list of rules to evaluate against a data source. At least one - # rule is required. - # @!attribute [rw] sampling_percent - # @return [::Float] - # 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. - # @!attribute [rw] row_filter - # @return [::String] - # 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 - # @!attribute [rw] post_scan_actions - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions] - # Optional. Actions to take upon job completion. - class DataQualitySpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration of post scan actions of DataQualityScan. - # @!attribute [rw] bigquery_export - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::BigQueryExport] - # Optional. If set, results will be exported to the provided BigQuery - # table. - # @!attribute [rw] notification_report - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::NotificationReport] - # Optional. If set, results will be sent to the provided notification - # receipts upon triggers. - class PostScanActions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration of BigQuery export post scan action. - # @!attribute [rw] results_table - # @return [::String] - # Optional. The BigQuery table to export DataQualityScan results to. - # Format: - # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - class BigQueryExport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The individuals or groups who are designated to receive notifications - # upon triggers. - # @!attribute [rw] emails - # @return [::Array<::String>] - # Optional. The email recipients who will receive the DataQualityScan - # results report. - class Recipients - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This trigger is triggered when the DQ score in the job result is less - # than a specified input score. - # @!attribute [rw] score_threshold - # @return [::Float] - # Optional. The score range is in [0,100]. - class ScoreThresholdTrigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This trigger is triggered when the scan job itself fails, regardless of - # the result. - class JobFailureTrigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This trigger is triggered whenever a scan job run ends, regardless - # of the result. - class JobEndTrigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration of notification report post scan action. - # @!attribute [rw] recipients - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::Recipients] - # Required. The recipients who will receive the notification report. - # @!attribute [rw] score_threshold_trigger - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::ScoreThresholdTrigger] - # Optional. If set, report will be sent when score threshold is met. - # @!attribute [rw] job_failure_trigger - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::JobFailureTrigger] - # Optional. If set, report will be sent when a scan job fails. - # @!attribute [rw] job_end_trigger - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::JobEndTrigger] - # Optional. If set, report will be sent when a scan job ends. - class NotificationReport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # The output of a DataQualityScan. - # @!attribute [rw] passed - # @return [::Boolean] - # Overall data quality result -- `true` if all rules passed. - # @!attribute [r] score - # @return [::Float] - # Output only. The overall data quality score. - # - # The score ranges between [0, 100] (up to two decimal points). - # @!attribute [rw] dimensions - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityDimensionResult>] - # 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. - # @!attribute [r] columns - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityColumnResult>] - # 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. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRuleResult>] - # A list of all the rules in a job, and their results. - # @!attribute [rw] row_count - # @return [::Integer] - # The count of rows processed. - # @!attribute [rw] scanned_data - # @return [::Google::Cloud::Dataplex::V1::ScannedData] - # The data scanned for this result. - # @!attribute [r] post_scan_actions_result - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult] - # Output only. The result of post scan actions. - class DataQualityResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of post scan actions of DataQualityScan job. - # @!attribute [r] bigquery_export_result - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult::BigQueryExportResult] - # Output only. The result of BigQuery export post scan action. - class PostScanActionsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of BigQuery export post scan action. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult::BigQueryExportResult::State] - # Output only. Execution state for the BigQuery exporting. - # @!attribute [r] message - # @return [::String] - # Output only. Additional information about the BigQuery exporting. - class BigQueryExportResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution state for the exporting. - module 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 - end - end - end - end - - # DataQualityRuleResult provides a more detailed, per-rule view of the results. - # @!attribute [rw] rule - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule] - # The rule specified in the DataQualitySpec, as is. - # @!attribute [rw] passed - # @return [::Boolean] - # Whether the rule passed or failed. - # @!attribute [rw] evaluated_count - # @return [::Integer] - # 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`. - # @!attribute [rw] passed_count - # @return [::Integer] - # The number of rows which passed a rule evaluation. - # - # This field is only valid for row-level type rules. - # @!attribute [rw] null_count - # @return [::Integer] - # The number of rows with null values in the specified column. - # @!attribute [rw] pass_ratio - # @return [::Float] - # The ratio of **passed_count / evaluated_count**. - # - # This field is only valid for row-level type rules. - # @!attribute [rw] failing_rows_query - # @return [::String] - # The query to find rows that did not pass this rule. - # - # This field is only valid for row-level type rules. - # @!attribute [r] assertion_row_count - # @return [::Integer] - # Output only. The number of rows returned by the sql statement in the - # SqlAssertion rule. - # - # This field is only valid for SqlAssertion rules. - class DataQualityRuleResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataQualityDimensionResult provides a more detailed, per-dimension view of - # the results. - # @!attribute [r] dimension - # @return [::Google::Cloud::Dataplex::V1::DataQualityDimension] - # Output only. The dimension config specified in the DataQualitySpec, as is. - # @!attribute [rw] passed - # @return [::Boolean] - # Whether the dimension passed or failed. - # @!attribute [r] score - # @return [::Float] - # 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). - class DataQualityDimensionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A dimension captures data quality intent about a defined subset of the rules - # specified. - # @!attribute [rw] name - # @return [::String] - # The dimension name a rule belongs to. Supported dimensions are - # ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", - # "INTEGRITY"] - class DataQualityDimension - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A rule captures data quality intent about a data source. - # @!attribute [rw] range_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RangeExpectation] - # Row-level rule which evaluates whether each column value lies between a - # specified range. - # @!attribute [rw] non_null_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::NonNullExpectation] - # Row-level rule which evaluates whether each column value is null. - # @!attribute [rw] set_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::SetExpectation] - # Row-level rule which evaluates whether each column value is contained by - # a specified set. - # @!attribute [rw] regex_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RegexExpectation] - # Row-level rule which evaluates whether each column value matches a - # specified regex. - # @!attribute [rw] uniqueness_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::UniquenessExpectation] - # Row-level rule which evaluates whether each column value is unique. - # @!attribute [rw] statistic_range_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation] - # Aggregate rule which evaluates whether the column aggregate - # statistic lies between a specified range. - # @!attribute [rw] row_condition_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RowConditionExpectation] - # Row-level rule which evaluates whether each row in a table passes the - # specified condition. - # @!attribute [rw] table_condition_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation] - # Aggregate rule which evaluates whether the provided expression is true - # for a table. - # @!attribute [rw] sql_assertion - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion] - # Aggregate rule which evaluates the number of rows returned for the - # provided statement. - # @!attribute [rw] column - # @return [::String] - # Optional. The unnested column which this rule is evaluated against. - # @!attribute [rw] ignore_null - # @return [::Boolean] - # 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 - # @!attribute [rw] dimension - # @return [::String] - # Required. The dimension a rule belongs to. Results are also aggregated at - # the dimension level. Supported dimensions are **["COMPLETENESS", - # "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** - # @!attribute [rw] threshold - # @return [::Float] - # 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. - # @!attribute [rw] name - # @return [::String] - # 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. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the rule. - # - # * The maximum length is 1,024 characters. - class DataQualityRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Evaluates whether each column value lies between a specified range. - # @!attribute [rw] min_value - # @return [::String] - # 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. - # @!attribute [rw] max_value - # @return [::String] - # 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. - # @!attribute [rw] strict_min_enabled - # @return [::Boolean] - # 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. - # @!attribute [rw] strict_max_enabled - # @return [::Boolean] - # 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. - class RangeExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether each column value is null. - class NonNullExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether each column value is contained by a specified set. - # @!attribute [rw] values - # @return [::Array<::String>] - # Optional. Expected values for the column value. - class SetExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether each column value matches a specified regex. - # @!attribute [rw] regex - # @return [::String] - # Optional. A regular expression the column value is expected to match. - class RegexExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether the column has duplicates. - class UniquenessExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether the column aggregate statistic lies between a specified - # range. - # @!attribute [rw] statistic - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic] - # Optional. The aggregate metric to evaluate. - # @!attribute [rw] min_value - # @return [::String] - # 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. - # @!attribute [rw] max_value - # @return [::String] - # 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. - # @!attribute [rw] strict_min_enabled - # @return [::Boolean] - # 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. - # @!attribute [rw] strict_max_enabled - # @return [::Boolean] - # 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. - class StatisticRangeExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of aggregate metrics a rule can be evaluated against. - module 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 - end - end - - # 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 - # @!attribute [rw] sql_expression - # @return [::String] - # Optional. The SQL expression. - class RowConditionExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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 - # @!attribute [rw] sql_expression - # @return [::String] - # Optional. The SQL expression. - class TableConditionExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Queries for rows returned by the provided SQL statement. If any rows are - # are returned, this rule fails. - # - # The SQL statement needs to use BigQuery standard SQL syntax, and must not - # contain any semicolons. - # - # $\\{data()} can be used to reference the rows being evaluated, i.e. the table - # after all additional filters (row filters, incremental data filters, - # sampling) are applied. - # - # Example: SELECT * FROM $\\{data()} WHERE price < 0 - # @!attribute [rw] sql_statement - # @return [::String] - # Optional. The SQL statement. - class SqlAssertion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # DataQualityColumnResult provides a more detailed, per-column view of - # the results. - # @!attribute [r] column - # @return [::String] - # Output only. The column specified in the DataQualityRule. - # @!attribute [r] score - # @return [::Float] - # 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). - class DataQualityColumnResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb deleted file mode 100644 index 072f86b2fcd8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb +++ /dev/null @@ -1,565 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # 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. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the DataTaxonomy, of the form: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id}. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataTaxonomy was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataTaxonomy was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the DataTaxonomy. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the DataTaxonomy. - # @!attribute [r] attribute_count - # @return [::Integer] - # Output only. The number of attributes in the DataTaxonomy. - # @!attribute [rw] etag - # @return [::String] - # 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. - # @!attribute [r] class_count - # @return [::Integer] - # Output only. The number of classes in the DataTaxonomy. - class DataTaxonomy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # 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 - # ``` - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the dataAttribute, of the form: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id}. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataAttribute was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataAttribute was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the DataAttribute. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the DataAttribute. - # @!attribute [rw] parent_id - # @return [::String] - # 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] - # @!attribute [r] attribute_count - # @return [::Integer] - # Output only. The number of child attributes present for this attribute. - # @!attribute [rw] etag - # @return [::String] - # 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. - # @!attribute [rw] resource_access_spec - # @return [::Google::Cloud::Dataplex::V1::ResourceAccessSpec] - # Optional. Specified when applied to a resource (eg: Cloud Storage bucket, - # BigQuery dataset, BigQuery table). - # @!attribute [rw] data_access_spec - # @return [::Google::Cloud::Dataplex::V1::DataAccessSpec] - # Optional. Specified when applied to data stored on the resource (eg: rows, - # columns in BigQuery Tables). - class DataAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # DataAttributeBinding represents binding of attributes to resources. Eg: Bind - # 'CustomerInfo' entity with 'PII' attribute. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the Data Attribute Binding, of - # the form: - # projects/\\{project_number}/locations/\\{location}/dataAttributeBindings/\\{data_attribute_binding_id} - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataAttributeBinding was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataAttributeBinding was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the DataAttributeBinding. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the DataAttributeBinding. - # @!attribute [rw] etag - # @return [::String] - # 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. - # @!attribute [rw] resource - # @return [::String] - # 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. - # @!attribute [rw] attributes - # @return [::Array<::String>] - # Optional. List of attributes to be associated with the resource, provided - # in the form: - # projects/\\{project}/locations/\\{location}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @!attribute [rw] paths - # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttributeBinding::Path>] - # Optional. The list of paths for items within the associated resource (eg. - # columns and partitions within a table) along with attribute bindings. - class DataAttributeBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a subresource of the given resource, and associated bindings - # with it. Currently supported subresources are column and partition schema - # fields within a table. - # @!attribute [rw] name - # @return [::String] - # Required. The name identifier of the path. - # Nested columns should be of the form: 'address.city'. - # @!attribute [rw] attributes - # @return [::Array<::String>] - # 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} - class Path - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Create DataTaxonomy request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] data_taxonomy_id - # @return [::String] - # 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. - # @!attribute [rw] data_taxonomy - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # Required. DataTaxonomy resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateDataTaxonomyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update DataTaxonomy request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] data_taxonomy - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # Required. Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateDataTaxonomyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get DataTaxonomy request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - class GetDataTaxonomyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataTaxonomies request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListDataTaxonomiesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataTaxonomies response. - # @!attribute [rw] data_taxonomies - # @return [::Array<::Google::Cloud::Dataplex::V1::DataTaxonomy>] - # DataTaxonomies under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataTaxonomiesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete DataTaxonomy request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value,the DeleteDataTaxonomy method returns an ABORTED error. - class DeleteDataTaxonomyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create DataAttribute request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @!attribute [rw] data_attribute_id - # @return [::String] - # 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. - # @!attribute [rw] data_attribute - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # Required. DataAttribute resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateDataAttributeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update DataAttribute request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] data_attribute - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # Required. Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateDataAttributeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get DataAttribute request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - class GetDataAttributeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataAttributes request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListDataAttributesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataAttributes response. - # @!attribute [rw] data_attributes - # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttribute>] - # DataAttributes under the given parent DataTaxonomy. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataAttributesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete DataAttribute request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteDataAttribute method returns an ABORTED error response. - class DeleteDataAttributeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create DataAttributeBinding request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id} - # @!attribute [rw] data_attribute_binding_id - # @return [::String] - # 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. - # @!attribute [rw] data_attribute_binding - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # Required. DataAttributeBinding resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateDataAttributeBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update DataAttributeBinding request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] data_attribute_binding - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # Required. Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateDataAttributeBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get DataAttributeBinding request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - class GetDataAttributeBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataAttributeBindings request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the Location: - # projects/\\{project_number}/locations/\\{location_id} - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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" - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListDataAttributeBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataAttributeBindings response. - # @!attribute [rw] data_attribute_bindings - # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] - # DataAttributeBindings under the given parent Location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataAttributeBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete DataAttributeBinding request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # @!attribute [rw] etag - # @return [::String] - # 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. - class DeleteDataAttributeBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb deleted file mode 100644 index 866900dcba0c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb +++ /dev/null @@ -1,474 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # Create dataScan request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] data_scan - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # Required. DataScan resource. - # @!attribute [rw] data_scan_id - # @return [::String] - # 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. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - class CreateDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update dataScan request. - # @!attribute [rw] data_scan - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # Required. DataScan resource to be updated. - # - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - class UpdateDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete dataScan request. - # @!attribute [rw] name - # @return [::String] - # 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. - class DeleteDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get dataScan request. - # @!attribute [rw] name - # @return [::String] - # 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. - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] - # Optional. Select the DataScan view to return. Defaults to `BASIC`. - class GetDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # DataScan view options. - module 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 - end - end - - # List dataScans request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - class ListDataScansRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List dataScans response. - # @!attribute [rw] data_scans - # @return [::Array<::Google::Cloud::Dataplex::V1::DataScan>] - # DataScans (`BASIC` view only) under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataScansResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Run DataScan Request - # @!attribute [rw] name - # @return [::String] - # 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. - class RunDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Run DataScan Response. - # @!attribute [rw] job - # @return [::Google::Cloud::Dataplex::V1::DataScanJob] - # DataScanJob created by RunDataScan request. - class RunDataScanResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get DataScanJob request. - # @!attribute [rw] name - # @return [::String] - # 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. - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] - # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - class GetDataScanJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # DataScanJob view options. - module 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 - end - end - - # List DataScanJobs request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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. - class ListDataScanJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataScanJobs response. - # @!attribute [rw] data_scan_jobs - # @return [::Array<::Google::Cloud::Dataplex::V1::DataScanJob>] - # DataScanJobs (`BASIC` view only) under a given dataScan. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListDataScanJobsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Generate recommended DataQualityRules request. - # @!attribute [rw] name - # @return [::String] - # Required. The name should be either - # * the name of a datascan with at least one successful completed data - # profiling job, or - # * the name of a successful completed data profiling datascan job. - class GenerateDataQualityRulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Generate recommended DataQualityRules response. - # @!attribute [rw] rule - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRule>] - # Generated recommended \\{@link DataQualityRule}s. - class GenerateDataQualityRulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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). - # @!attribute [r] name - # @return [::String] - # 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. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the scan. - # - # * Must be between 1-1024 characters. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # - # * Must be between 1-256 characters. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the scan. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the DataScan. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the scan was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the scan was last updated. - # @!attribute [rw] data - # @return [::Google::Cloud::Dataplex::V1::DataSource] - # Required. The data source for DataScan. - # @!attribute [rw] execution_spec - # @return [::Google::Cloud::Dataplex::V1::DataScan::ExecutionSpec] - # Optional. DataScan execution settings. - # - # If not specified, the fields in it will use their default values. - # @!attribute [r] execution_status - # @return [::Google::Cloud::Dataplex::V1::DataScan::ExecutionStatus] - # Output only. Status of the data scan execution. - # @!attribute [r] type - # @return [::Google::Cloud::Dataplex::V1::DataScanType] - # Output only. The type of DataScan. - # @!attribute [rw] data_quality_spec - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec] - # DataQualityScan related setting. - # @!attribute [rw] data_profile_spec - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec] - # DataProfileScan related setting. - # @!attribute [r] data_quality_result - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult] - # Output only. The result of the data quality scan. - # @!attribute [r] data_profile_result - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult] - # Output only. The result of the data profile scan. - class DataScan - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # DataScan execution settings. - # @!attribute [rw] trigger - # @return [::Google::Cloud::Dataplex::V1::Trigger] - # 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. - # @!attribute [rw] field - # @return [::String] - # 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. - class ExecutionSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of the data scan execution. - # @!attribute [rw] latest_job_start_time - # @return [::Google::Protobuf::Timestamp] - # The time when the latest DataScanJob started. - # @!attribute [rw] latest_job_end_time - # @return [::Google::Protobuf::Timestamp] - # The time when the latest DataScanJob ended. - class ExecutionStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A DataScanJob represents an instance of DataScan execution. - # @!attribute [r] name - # @return [::String] - # 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. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the DataScanJob. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataScanJob was started. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataScanJob ended. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::DataScanJob::State] - # Output only. Execution state for the DataScanJob. - # @!attribute [r] message - # @return [::String] - # Output only. Additional information about the current state. - # @!attribute [r] type - # @return [::Google::Cloud::Dataplex::V1::DataScanType] - # Output only. The type of the parent DataScan. - # @!attribute [r] data_quality_spec - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec] - # Output only. DataQualityScan related setting. - # @!attribute [r] data_profile_spec - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec] - # Output only. DataProfileScan related setting. - # @!attribute [r] data_quality_result - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult] - # Output only. The result of the data quality scan. - # @!attribute [r] data_profile_result - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult] - # Output only. The result of the data profile scan. - class DataScanJob - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution state for the DataScanJob. - module 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 - end - end - - # The type of DataScan. - module DataScanType - # The DataScan type is unspecified. - DATA_SCAN_TYPE_UNSPECIFIED = 0 - - # Data Quality scan. - DATA_QUALITY = 1 - - # Data Profile scan. - DATA_PROFILE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb deleted file mode 100644 index 87e2a85289cf..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb +++ /dev/null @@ -1,814 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # The payload associated with Discovery data processing. - # @!attribute [rw] message - # @return [::String] - # The log message. - # @!attribute [rw] lake_id - # @return [::String] - # The id of the associated lake. - # @!attribute [rw] zone_id - # @return [::String] - # The id of the associated zone. - # @!attribute [rw] asset_id - # @return [::String] - # The id of the associated asset. - # @!attribute [rw] data_location - # @return [::String] - # The data location associated with the event. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EventType] - # The type of the event being logged. - # @!attribute [rw] config - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::ConfigDetails] - # Details about discovery configuration in effect. - # @!attribute [rw] entity - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityDetails] - # Details about the entity associated with the event. - # @!attribute [rw] partition - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::PartitionDetails] - # Details about the partition associated with the event. - # @!attribute [rw] action - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::ActionDetails] - # Details about the action associated with the event. - class DiscoveryEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Details about configuration events. - # @!attribute [rw] parameters - # @return [::Google::Protobuf::Map{::String => ::String}] - # A list of discovery configuration parameters in effect. - # The keys are the field paths within DiscoverySpec. - # Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, - # etc. - class ConfigDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParametersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details about the entity. - # @!attribute [rw] entity - # @return [::String] - # The name of the entity resource. - # The name is the fully-qualified resource name. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityType] - # The type of the entity resource. - class EntityDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about the partition. - # @!attribute [rw] partition - # @return [::String] - # The name to the partition resource. - # The name is the fully-qualified resource name. - # @!attribute [rw] entity - # @return [::String] - # The name to the containing entity resource. - # The name is the fully-qualified resource name. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityType] - # The type of the containing entity resource. - # @!attribute [rw] sampled_data_locations - # @return [::Array<::String>] - # The locations of the data items (e.g., a Cloud Storage objects) sampled - # for metadata inference. - class PartitionDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about the action. - # @!attribute [rw] type - # @return [::String] - # The type of action. - # Eg. IncompatibleDataSchema, InvalidDataFormat - class ActionDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of the event. - module 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 - end - - # The type of the entity. - module EntityType - # An unspecified event type. - ENTITY_TYPE_UNSPECIFIED = 0 - - # Entities representing structured data. - TABLE = 1 - - # Entities representing unstructured data. - FILESET = 2 - end - end - - # The payload associated with Job logs that contains events describing jobs - # that have run within a Lake. - # @!attribute [rw] message - # @return [::String] - # The log message. - # @!attribute [rw] job_id - # @return [::String] - # The unique id identifying the job. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time when the job started running. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time when the job ended running. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::JobEvent::State] - # The job state on completion. - # @!attribute [rw] retries - # @return [::Integer] - # The number of retries. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::JobEvent::Type] - # The type of the job. - # @!attribute [rw] service - # @return [::Google::Cloud::Dataplex::V1::JobEvent::Service] - # The service used to execute the job. - # @!attribute [rw] service_job - # @return [::String] - # The reference to the job within the service. - # @!attribute [rw] execution_trigger - # @return [::Google::Cloud::Dataplex::V1::JobEvent::ExecutionTrigger] - # Job execution trigger. - class JobEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the job. - module Type - # Unspecified job type. - TYPE_UNSPECIFIED = 0 - - # Spark jobs. - SPARK = 1 - - # Notebook jobs. - NOTEBOOK = 2 - end - - # The completion status of the job. - module 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 - end - - # The service used to execute the job. - module Service - # Unspecified service. - SERVICE_UNSPECIFIED = 0 - - # Cloud Dataproc. - DATAPROC = 1 - end - - # Job Execution trigger. - module 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 - end - end - - # These messages contain information about sessions within an environment. - # The monitored resource is 'Environment'. - # @!attribute [rw] message - # @return [::String] - # The log message. - # @!attribute [rw] user_id - # @return [::String] - # The information about the user that created the session. It will be the - # email address of the user. - # @!attribute [rw] session_id - # @return [::String] - # Unique identifier for the session. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::SessionEvent::EventType] - # The type of the event. - # @!attribute [rw] query - # @return [::Google::Cloud::Dataplex::V1::SessionEvent::QueryDetail] - # The execution details of the query. - # @!attribute [rw] event_succeeded - # @return [::Boolean] - # The status of the event. - # @!attribute [rw] fast_startup_enabled - # @return [::Boolean] - # If the session is associated with an environment with fast startup enabled, - # and was created before being assigned to a user. - # @!attribute [rw] unassigned_duration - # @return [::Google::Protobuf::Duration] - # The idle duration of a warm pooled session before it is assigned to user. - class SessionEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution details of the query. - # @!attribute [rw] query_id - # @return [::String] - # The unique Query id identifying the query. - # @!attribute [rw] query_text - # @return [::String] - # The query text executed. - # @!attribute [rw] engine - # @return [::Google::Cloud::Dataplex::V1::SessionEvent::QueryDetail::Engine] - # Query Execution engine. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # Time taken for execution of the query. - # @!attribute [rw] result_size_bytes - # @return [::Integer] - # The size of results the query produced. - # @!attribute [rw] data_processed_bytes - # @return [::Integer] - # The data processed by the query. - class QueryDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Query Execution engine. - module 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 - end - end - - # The type of the event. - module 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 - end - end - - # Payload associated with Governance related log events. - # @!attribute [rw] message - # @return [::String] - # The log message. - # @!attribute [rw] event_type - # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::EventType] - # The type of the event. - # @!attribute [rw] entity - # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::Entity] - # Entity resource information if the log event is associated with a - # specific entity. - class GovernanceEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about Entity resource that the log event is associated with. - # @!attribute [rw] entity - # @return [::String] - # 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}` - # @!attribute [rw] entity_type - # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::Entity::EntityType] - # Type of entity. - class Entity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of entity. - module EntityType - # An unspecified Entity type. - ENTITY_TYPE_UNSPECIFIED = 0 - - # Table entity type. - TABLE = 1 - - # Fileset entity type. - FILESET = 2 - end - end - - # Type of governance log event. - module 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 - end - end - - # These messages contain information about the execution of a datascan. - # The monitored resource is 'DataScan' - # Next ID: 13 - # @!attribute [rw] data_source - # @return [::String] - # The data source of the data scan - # @!attribute [rw] job_id - # @return [::String] - # The identifier of the specific data scan job this log entry is for. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the data scan job was created. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time when the data scan job started to run. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time when the data scan job finished. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::ScanType] - # The type of the data scan. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::State] - # The status of the data scan job. - # @!attribute [rw] message - # @return [::String] - # The message describing the data scan job event. - # @!attribute [rw] spec_version - # @return [::String] - # A version identifier of the spec which was used to execute this job. - # @!attribute [rw] trigger - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::Trigger] - # The trigger type of the data scan job. - # @!attribute [rw] scope - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::Scope] - # The scope of the data scan (e.g. full, incremental). - # @!attribute [rw] data_profile - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataProfileResult] - # Data profile result for data profile type data scan. - # @!attribute [rw] data_quality - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataQualityResult] - # Data quality result for data quality type data scan. - # @!attribute [rw] data_profile_configs - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataProfileAppliedConfigs] - # Applied configs for data profile type data scan. - # @!attribute [rw] data_quality_configs - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataQualityAppliedConfigs] - # Applied configs for data quality type data scan. - # @!attribute [rw] post_scan_actions_result - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult] - # The result of post scan actions. - class DataScanEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Data profile result for data scan job. - # @!attribute [rw] row_count - # @return [::Integer] - # The count of rows processed in the data scan job. - class DataProfileResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Data quality result for data scan job. - # @!attribute [rw] row_count - # @return [::Integer] - # The count of rows processed in the data scan job. - # @!attribute [rw] passed - # @return [::Boolean] - # Whether the data quality result was `pass` or not. - # @!attribute [rw] dimension_passed - # @return [::Google::Protobuf::Map{::String => ::Boolean}] - # 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. - # @!attribute [rw] score - # @return [::Float] - # The table-level data quality score for the data scan job. - # - # The data quality score ranges between [0, 100] (up to two decimal - # points). - # @!attribute [rw] dimension_score - # @return [::Google::Protobuf::Map{::String => ::Float}] - # 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). - # @!attribute [rw] column_score - # @return [::Google::Protobuf::Map{::String => ::Float}] - # 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). - class DataQualityResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Boolean] - class DimensionPassedEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Float] - class DimensionScoreEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Float] - class ColumnScoreEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Applied configs for data profile type data scan job. - # @!attribute [rw] sampling_percent - # @return [::Float] - # 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. - # @!attribute [rw] row_filter_applied - # @return [::Boolean] - # Boolean indicating whether a row filter was applied in the DataScan job. - # @!attribute [rw] column_filter_applied - # @return [::Boolean] - # Boolean indicating whether a column filter was applied in the DataScan - # job. - class DataProfileAppliedConfigs - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Applied configs for data quality type data scan job. - # @!attribute [rw] sampling_percent - # @return [::Float] - # 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. - # @!attribute [rw] row_filter_applied - # @return [::Boolean] - # Boolean indicating whether a row filter was applied in the DataScan job. - class DataQualityAppliedConfigs - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Post scan actions result for data scan job. - # @!attribute [rw] bigquery_export_result - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult::BigQueryExportResult] - # The result of BigQuery export post scan action. - class PostScanActionsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of BigQuery export post scan action. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult::BigQueryExportResult::State] - # Execution state for the BigQuery exporting. - # @!attribute [rw] message - # @return [::String] - # Additional information about the BigQuery exporting. - class BigQueryExportResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution state for the exporting. - module 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 - end - end - end - - # The type of the data scan. - module 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 - end - - # The job state of the data scan. - module 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 - end - - # The trigger type for the data scan. - module Trigger - # An unspecified trigger type. - TRIGGER_UNSPECIFIED = 0 - - # Data scan triggers on demand. - ON_DEMAND = 1 - - # Data scan triggers as per schedule. - SCHEDULE = 2 - end - - # The scope of job for the data scan. - module 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 - end - end - - # Information about the result of a data quality rule for data quality scan. - # The monitored resource is 'DataScan'. - # @!attribute [rw] job_id - # @return [::String] - # Identifier of the specific data scan job this log entry is for. - # @!attribute [rw] data_source - # @return [::String] - # The data source of the data scan (e.g. BigQuery table name). - # @!attribute [rw] column - # @return [::String] - # The column which this rule is evaluated against. - # @!attribute [rw] rule_name - # @return [::String] - # The name of the data quality rule. - # @!attribute [rw] rule_type - # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::RuleType] - # The type of the data quality rule. - # @!attribute [rw] evalution_type - # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::EvaluationType] - # The evaluation type of the data quality rule. - # @!attribute [rw] rule_dimension - # @return [::String] - # The dimension of the data quality rule. - # @!attribute [rw] threshold_percent - # @return [::Float] - # The passing threshold ([0.0, 100.0]) of the data quality rule. - # @!attribute [rw] result - # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::Result] - # The result of the data quality rule. - # @!attribute [rw] evaluated_row_count - # @return [::Integer] - # The number of rows evaluated against the data quality rule. - # This field is only valid for rules of PER_ROW evaluation type. - # @!attribute [rw] passed_row_count - # @return [::Integer] - # The number of rows which passed a rule evaluation. - # This field is only valid for rules of PER_ROW evaluation type. - # @!attribute [rw] null_row_count - # @return [::Integer] - # The number of rows with null values in the specified column. - # @!attribute [rw] assertion_row_count - # @return [::Integer] - # The number of rows returned by the sql statement in the SqlAssertion rule. - # This field is only valid for SqlAssertion rules. - class DataQualityScanRuleResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the data quality rule. - module RuleType - # An unspecified rule type. - RULE_TYPE_UNSPECIFIED = 0 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#nonnullexpectation. - NON_NULL_EXPECTATION = 1 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rangeexpectation. - RANGE_EXPECTATION = 2 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#regexexpectation. - REGEX_EXPECTATION = 3 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rowconditionexpectation. - ROW_CONDITION_EXPECTATION = 4 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#setexpectation. - SET_EXPECTATION = 5 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#statisticrangeexpectation. - STATISTIC_RANGE_EXPECTATION = 6 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#tableconditionexpectation. - TABLE_CONDITION_EXPECTATION = 7 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#uniquenessexpectation. - UNIQUENESS_EXPECTATION = 8 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#sqlAssertion. - SQL_ASSERTION = 9 - end - - # The evaluation type of the data quality rule. - module 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 - end - - # Whether the data quality rule passed or failed. - module Result - # An unspecified result. - RESULT_UNSPECIFIED = 0 - - # The data quality rule passed. - PASSED = 1 - - # The data quality rule failed. - FAILED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb deleted file mode 100644 index 53866289671e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb +++ /dev/null @@ -1,733 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # Create a metadata entity request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] entity - # @return [::Google::Cloud::Dataplex::V1::Entity] - # Required. Entity resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateEntityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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. - # @!attribute [rw] entity - # @return [::Google::Cloud::Dataplex::V1::Entity] - # Required. Update description. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateEntityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete a metadata entity request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @!attribute [rw] etag - # @return [::String] - # Required. The etag associated with the entity, which can be retrieved with - # a [GetEntity][] request. - class DeleteEntityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List metadata entities request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] - # Required. Specify the entity view to make a partial list request. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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" - class ListEntitiesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Entity views. - module 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 - end - end - - # List metadata entities response. - # @!attribute [rw] entities - # @return [::Array<::Google::Cloud::Dataplex::V1::Entity>] - # Entities in the specified parent zone. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # remaining results in the list. - class ListEntitiesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get metadata entity request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] - # Optional. Used to select the subset of entity information to return. - # Defaults to `BASIC`. - class GetEntityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Entity views for get entity partial result. - module 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 - end - end - - # List metadata partitions request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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. - class ListPartitionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create metadata partition request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @!attribute [rw] partition - # @return [::Google::Cloud::Dataplex::V1::Partition] - # Required. Partition resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreatePartitionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete metadata partition request. - # @!attribute [rw] name - # @return [::String] - # 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. - # @!attribute [rw] etag - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. The etag associated with the partition. - class DeletePartitionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List metadata partitions response. - # @!attribute [rw] partitions - # @return [::Array<::Google::Cloud::Dataplex::V1::Partition>] - # Partitions under the specified parent entity. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # remaining results in the list. - class ListPartitionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get metadata partition request. - # @!attribute [rw] name - # @return [::String] - # 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. - class GetPartitionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents tables and fileset metadata contained within a zone. - # @!attribute [r] name - # @return [::String] - # 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}`. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Display name must be shorter than or equal to 256 characters. - # @!attribute [rw] description - # @return [::String] - # Optional. User friendly longer description text. Must be shorter than or - # equal to 1024 characters. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the entity was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the entity was last updated. - # @!attribute [rw] id - # @return [::String] - # 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. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag associated with the entity, which can be retrieved with - # a [GetEntity][] request. Required for update and delete requests. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Entity::Type] - # Required. Immutable. The type of entity. - # @!attribute [rw] asset - # @return [::String] - # 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. - # @!attribute [rw] data_path - # @return [::String] - # 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`. - # @!attribute [rw] data_path_pattern - # @return [::String] - # 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`. - # @!attribute [r] catalog_entry - # @return [::String] - # Output only. The name of the associated Data Catalog entry. - # @!attribute [rw] system - # @return [::Google::Cloud::Dataplex::V1::StorageSystem] - # Required. Immutable. Identifies the storage system of the entity data. - # @!attribute [rw] format - # @return [::Google::Cloud::Dataplex::V1::StorageFormat] - # Required. Identifies the storage format of the entity data. - # It does not apply to entities with data stored in BigQuery. - # @!attribute [r] compatibility - # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus] - # Output only. Metadata stores that the entity is compatible with. - # @!attribute [r] access - # @return [::Google::Cloud::Dataplex::V1::StorageAccess] - # Output only. Identifies the access mechanism to the entity. Not user - # settable. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [rw] schema - # @return [::Google::Cloud::Dataplex::V1::Schema] - # 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. - class Entity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Provides compatibility information for various metadata stores. - # @!attribute [r] hive_metastore - # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus::Compatibility] - # Output only. Whether this entity is compatible with Hive Metastore. - # @!attribute [r] bigquery - # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus::Compatibility] - # Output only. Whether this entity is compatible with BigQuery. - class CompatibilityStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Provides compatibility information for a specific metadata store. - # @!attribute [r] compatible - # @return [::Boolean] - # Output only. Whether the entity is compatible and can be represented in - # the metadata store. - # @!attribute [r] reason - # @return [::String] - # Output only. Provides additional detail if the entity is incompatible - # with the metadata store. - class Compatibility - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The type of entity. - module Type - # Type unspecified. - TYPE_UNSPECIFIED = 0 - - # Structured and semi-structured data. - TABLE = 1 - - # Unstructured data. - FILESET = 2 - end - end - - # Represents partition metadata contained within entity instances. - # @!attribute [r] name - # @return [::String] - # 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. - # @!attribute [rw] values - # @return [::Array<::String>] - # Required. Immutable. The set of values representing the partition, which - # correspond to the partition schema defined in the parent entity. - # @!attribute [rw] location - # @return [::String] - # 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/` - # @!attribute [rw] etag - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. The etag for this partition. - class Partition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Schema information describing the structure and layout of the data. - # @!attribute [rw] user_managed - # @return [::Boolean] - # 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. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>] - # Optional. The sequence of fields describing data in table entities. - # **Note:** BigQuery SchemaFields are immutable. - # @!attribute [rw] partition_fields - # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::PartitionField>] - # Optional. The sequence of fields describing the partition structure in - # entities. If this field is empty, there are no partitions within the data. - # @!attribute [rw] partition_style - # @return [::Google::Cloud::Dataplex::V1::Schema::PartitionStyle] - # Optional. The structure of paths containing partition data within the - # entity. - class Schema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a column field within a table schema. - # @!attribute [rw] name - # @return [::String] - # 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. - # @!attribute [rw] description - # @return [::String] - # Optional. User friendly field description. Must be less than or equal to - # 1024 characters. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Schema::Type] - # Required. The type of field. - # @!attribute [rw] mode - # @return [::Google::Cloud::Dataplex::V1::Schema::Mode] - # Required. Additional field semantics. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>] - # Optional. Any nested field for complex types. - class SchemaField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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. - # @!attribute [rw] name - # @return [::String] - # 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.. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Schema::Type] - # Required. Immutable. The type of field. - class PartitionField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Type information for fields in schemas and partition schemas. - module 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 - end - - # Additional qualifiers to define field semantics. - module 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 - end - - # The structure of paths within the entity, which represent partitions. - module 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 - end - end - - # Describes the format of the data within its storage location. - # @!attribute [r] format - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::Format] - # Output only. The data format associated with the stored data, which - # represents content type values. The value is inferred from mime type. - # @!attribute [rw] compression_format - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::CompressionFormat] - # Optional. The compression type associated with the stored data. - # If unspecified, the data is uncompressed. - # @!attribute [rw] mime_type - # @return [::String] - # 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} - # @!attribute [rw] csv - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::CsvOptions] - # Optional. Additional information about CSV formatted data. - # @!attribute [rw] json - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::JsonOptions] - # Optional. Additional information about CSV formatted data. - # @!attribute [rw] iceberg - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::IcebergOptions] - # Optional. Additional information about iceberg tables. - class StorageFormat - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes CSV and similar semi-structured data formats. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. Accepts "US-ASCII", - # "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. - # @!attribute [rw] header_rows - # @return [::Integer] - # Optional. The number of rows to interpret as header rows that should be - # skipped when reading data rows. Defaults to 0. - # @!attribute [rw] delimiter - # @return [::String] - # Optional. The delimiter used to separate values. Defaults to ','. - # @!attribute [rw] quote - # @return [::String] - # Optional. The character used to quote column values. Accepts '"' - # (double quotation mark) or ''' (single quotation mark). Defaults to - # '"' (double quotation mark) if unspecified. - class CsvOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes JSON data format. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" - # and "ISO-8859-1". Defaults to UTF-8 if not specified. - class JsonOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes Iceberg data format. - # @!attribute [rw] metadata_location - # @return [::String] - # Optional. The location of where the iceberg metadata is present, must be - # within the table path - class IcebergOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specific file format of the data. - module 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 - end - - # The specific compressed file format of the data. - module CompressionFormat - # CompressionFormat unspecified. Implies uncompressed data. - COMPRESSION_FORMAT_UNSPECIFIED = 0 - - # GZip compressed set of files. - GZIP = 2 - - # BZip2 compressed set of files. - BZIP2 = 3 - end - end - - # Describes the access mechanism of the data within its storage location. - # @!attribute [r] read - # @return [::Google::Cloud::Dataplex::V1::StorageAccess::AccessMode] - # Output only. Describes the read access mechanism of the data. Not user - # settable. - class StorageAccess - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Access Mode determines how data stored within the Entity is read. - module 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 - end - end - - # Identifies the cloud system that manages the data storage. - module 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 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb deleted file mode 100644 index 5ca2d5c43e57..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb +++ /dev/null @@ -1,106 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # DataScan scheduling and trigger settings. - # @!attribute [rw] on_demand - # @return [::Google::Cloud::Dataplex::V1::Trigger::OnDemand] - # The scan runs once via `RunDataScan` API. - # @!attribute [rw] schedule - # @return [::Google::Cloud::Dataplex::V1::Trigger::Schedule] - # The scan is scheduled to run periodically. - class Trigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The scan runs once via `RunDataScan` API. - class OnDemand - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The scan is scheduled to run periodically. - # @!attribute [rw] cron - # @return [::String] - # 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. - class Schedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The data source for DataScan. - # @!attribute [rw] entity - # @return [::String] - # 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}`. - # @!attribute [rw] resource - # @return [::String] - # 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 - class DataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The data scanned during processing (e.g. in incremental DataScan) - # @!attribute [rw] incremental_field - # @return [::Google::Cloud::Dataplex::V1::ScannedData::IncrementalField] - # The range denoted by values of an incremental field - class ScannedData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A data range denoted by a pair of start/end values of a field. - # @!attribute [rw] field - # @return [::String] - # The field that contains values which monotonically increases over time - # (e.g. a timestamp column). - # @!attribute [rw] start - # @return [::String] - # Value that marks the start of the range. - # @!attribute [rw] end - # @return [::String] - # Value that marks the end of the range. - class IncrementalField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb deleted file mode 100644 index c60ba4fca1b6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb +++ /dev/null @@ -1,838 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module 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. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the lake, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the lake was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the lake was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the lake. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the lake. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the lake. - # @!attribute [r] service_account - # @return [::String] - # Output only. Service account associated with this lake. This service - # account must be authorized to access or operate on resources managed by the - # lake. - # @!attribute [rw] metastore - # @return [::Google::Cloud::Dataplex::V1::Lake::Metastore] - # Optional. Settings to manage lake and Dataproc Metastore service instance - # association. - # @!attribute [r] asset_status - # @return [::Google::Cloud::Dataplex::V1::AssetStatus] - # Output only. Aggregated status of the underlying assets of the lake. - # @!attribute [r] metastore_status - # @return [::Google::Cloud::Dataplex::V1::Lake::MetastoreStatus] - # Output only. Metastore status of the lake. - class Lake - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings to manage association of Dataproc Metastore with a lake. - # @!attribute [rw] service - # @return [::String] - # 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}` - class Metastore - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of Lake and Dataproc Metastore service instance association. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::Lake::MetastoreStatus::State] - # Current state of association. - # @!attribute [rw] message - # @return [::String] - # Additional information about the current status. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the metastore status of the lake. - # @!attribute [rw] endpoint - # @return [::String] - # The URI of the endpoint used to access the Metastore service. - class MetastoreStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Current state of association. - module 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 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Aggregated status of the underlying assets of a lake or zone. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the status. - # @!attribute [rw] active_assets - # @return [::Integer] - # Number of active assets. - # @!attribute [rw] security_policy_applying_assets - # @return [::Integer] - # Number of assets that are in process of updating the security policy on - # attached resources. - class AssetStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the zone, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the zone was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the zone was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined labels for the zone. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the zone. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the zone. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Zone::Type] - # Required. Immutable. The type of the zone. - # @!attribute [rw] discovery_spec - # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec] - # Optional. Specification of the discovery feature applied to data in this - # zone. - # @!attribute [rw] resource_spec - # @return [::Google::Cloud::Dataplex::V1::Zone::ResourceSpec] - # Required. Specification of the resources that are referenced by the assets - # within this zone. - # @!attribute [r] asset_status - # @return [::Google::Cloud::Dataplex::V1::AssetStatus] - # Output only. Aggregated status of the underlying assets of the zone. - class Zone - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings for resources attached as assets within a zone. - # @!attribute [rw] location_type - # @return [::Google::Cloud::Dataplex::V1::Zone::ResourceSpec::LocationType] - # Required. Immutable. The location type of the resources that are allowed - # to be attached to the assets within this zone. - class ResourceSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Location type of the resources attached to a zone. - module 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 - end - end - - # Settings to manage the metadata discovery and publishing in a zone. - # @!attribute [rw] enabled - # @return [::Boolean] - # Required. Whether discovery is enabled. - # @!attribute [rw] include_patterns - # @return [::Array<::String>] - # 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. - # @!attribute [rw] exclude_patterns - # @return [::Array<::String>] - # 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. - # @!attribute [rw] csv_options - # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec::CsvOptions] - # Optional. Configuration for CSV data. - # @!attribute [rw] json_options - # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec::JsonOptions] - # Optional. Configuration for Json data. - # @!attribute [rw] schedule - # @return [::String] - # 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 * * * *`. - class DiscoverySpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describe CSV and similar semi-structured data formats. - # @!attribute [rw] header_rows - # @return [::Integer] - # Optional. The number of rows to interpret as header rows that should be - # skipped when reading data rows. - # @!attribute [rw] delimiter - # @return [::String] - # Optional. The delimiter being used to separate values. This defaults to - # ','. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. The default is UTF-8. - # @!attribute [rw] disable_type_inference - # @return [::Boolean] - # Optional. Whether to disable the inference of data type for CSV data. - # If true, all columns will be registered as strings. - class CsvOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describe JSON data format. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. The default is UTF-8. - # @!attribute [rw] disable_type_inference - # @return [::Boolean] - # 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). - class JsonOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Type of zone. - module 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 - end - end - - # Action represents an issue requiring administrator action for resolution. - # @!attribute [rw] category - # @return [::Google::Cloud::Dataplex::V1::Action::Category] - # The category of issue associated with the action. - # @!attribute [rw] issue - # @return [::String] - # Detailed description of the issue requiring action. - # @!attribute [rw] detect_time - # @return [::Google::Protobuf::Timestamp] - # The time that the issue was detected. - # @!attribute [r] name - # @return [::String] - # 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}`. - # @!attribute [r] lake - # @return [::String] - # Output only. The relative resource name of the lake, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [r] zone - # @return [::String] - # Output only. The relative resource name of the zone, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [r] asset - # @return [::String] - # 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}`. - # @!attribute [rw] data_locations - # @return [::Array<::String>] - # 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`). - # @!attribute [rw] invalid_data_format - # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataFormat] - # Details for issues related to invalid or unsupported data formats. - # @!attribute [rw] incompatible_data_schema - # @return [::Google::Cloud::Dataplex::V1::Action::IncompatibleDataSchema] - # Details for issues related to incompatible schemas detected within data. - # @!attribute [rw] invalid_data_partition - # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataPartition] - # Details for issues related to invalid or unsupported data partition - # structure. - # @!attribute [rw] missing_data - # @return [::Google::Cloud::Dataplex::V1::Action::MissingData] - # Details for issues related to absence of data within managed resources. - # @!attribute [rw] missing_resource - # @return [::Google::Cloud::Dataplex::V1::Action::MissingResource] - # Details for issues related to absence of a managed resource. - # @!attribute [rw] unauthorized_resource - # @return [::Google::Cloud::Dataplex::V1::Action::UnauthorizedResource] - # Details for issues related to lack of permissions to access data - # resources. - # @!attribute [rw] failed_security_policy_apply - # @return [::Google::Cloud::Dataplex::V1::Action::FailedSecurityPolicyApply] - # Details for issues related to applying security policy. - # @!attribute [rw] invalid_data_organization - # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataOrganization] - # Details for issues related to invalid data arrangement. - class Action - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Action details for resource references in assets that cannot be located. - class MissingResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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. - class UnauthorizedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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. - # @!attribute [rw] asset - # @return [::String] - # Resource name of one of the assets with failing security policy - # application. Populated for a lake or zone resource only. - class FailedSecurityPolicyApply - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Action details for invalid or unsupported data files detected by discovery. - # @!attribute [rw] sampled_data_locations - # @return [::Array<::String>] - # The list of data locations sampled and used for format/schema - # inference. - # @!attribute [rw] expected_format - # @return [::String] - # The expected data format of the entity. - # @!attribute [rw] new_format - # @return [::String] - # The new unexpected data format within the entity. - class InvalidDataFormat - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Action details for incompatible schemas detected by discovery. - # @!attribute [rw] table - # @return [::String] - # The name of the table containing invalid data. - # @!attribute [rw] existing_schema - # @return [::String] - # The existing and expected schema of the table. The schema is provided as - # a JSON formatted structure listing columns and data types. - # @!attribute [rw] new_schema - # @return [::String] - # The new and incompatible schema within the table. The schema is provided - # as a JSON formatted structured listing columns and data types. - # @!attribute [rw] sampled_data_locations - # @return [::Array<::String>] - # The list of data locations sampled and used for format/schema - # inference. - # @!attribute [rw] schema_change - # @return [::Google::Cloud::Dataplex::V1::Action::IncompatibleDataSchema::SchemaChange] - # Whether the action relates to a schema that is incompatible or modified. - class IncompatibleDataSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Whether the action relates to a schema that is incompatible or modified. - module 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 - end - end - - # Action details for invalid or unsupported partitions detected by discovery. - # @!attribute [rw] expected_structure - # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataPartition::PartitionStructure] - # The issue type of InvalidDataPartition. - class InvalidDataPartition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The expected partition structure. - module 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 - end - end - - # Action details for absence of data detected by discovery. - class MissingData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Action details for invalid data arrangement. - class InvalidDataOrganization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The category of issues. - module 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 - end - end - - # An asset represents a cloud resource that is being managed within a lake as a - # member of a zone. - # @!attribute [r] name - # @return [::String] - # 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}`. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the asset was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the asset was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined labels for the asset. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the asset. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the asset. - # @!attribute [rw] resource_spec - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec] - # Required. Specification of the resource that is referenced by this asset. - # @!attribute [r] resource_status - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceStatus] - # Output only. Status of the resource referenced by this asset. - # @!attribute [r] security_status - # @return [::Google::Cloud::Dataplex::V1::Asset::SecurityStatus] - # Output only. Status of the security policy applied to resource referenced - # by this asset. - # @!attribute [rw] discovery_spec - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec] - # 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. - # @!attribute [r] discovery_status - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus] - # Output only. Status of the discovery feature applied to data referenced by - # this asset. - class Asset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Security policy status of the asset. Data security policy, i.e., readers, - # writers & owners, should be specified in the lake/zone/asset IAM policy. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::Asset::SecurityStatus::State] - # The current state of the security policy applied to the attached - # resource. - # @!attribute [rw] message - # @return [::String] - # Additional information about the current state. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the status. - class SecurityStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the security policy. - module 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 - end - end - - # Settings to manage the metadata discovery and publishing for an asset. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. Whether discovery is enabled. - # @!attribute [rw] include_patterns - # @return [::Array<::String>] - # 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. - # @!attribute [rw] exclude_patterns - # @return [::Array<::String>] - # 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. - # @!attribute [rw] csv_options - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec::CsvOptions] - # Optional. Configuration for CSV data. - # @!attribute [rw] json_options - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec::JsonOptions] - # Optional. Configuration for Json data. - # @!attribute [rw] schedule - # @return [::String] - # 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 * * * *`. - class DiscoverySpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describe CSV and similar semi-structured data formats. - # @!attribute [rw] header_rows - # @return [::Integer] - # Optional. The number of rows to interpret as header rows that should be - # skipped when reading data rows. - # @!attribute [rw] delimiter - # @return [::String] - # Optional. The delimiter being used to separate values. This defaults to - # ','. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. The default is UTF-8. - # @!attribute [rw] disable_type_inference - # @return [::Boolean] - # Optional. Whether to disable the inference of data type for CSV data. - # If true, all columns will be registered as strings. - class CsvOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describe JSON data format. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. The default is UTF-8. - # @!attribute [rw] disable_type_inference - # @return [::Boolean] - # 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). - class JsonOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Identifies the cloud resource that is referenced by this asset. - # @!attribute [rw] name - # @return [::String] - # 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}` - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec::Type] - # Required. Immutable. Type of resource. - # @!attribute [rw] read_access_mode - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec::AccessMode] - # Optional. Determines how read permissions are handled for each asset and - # their associated tables. Only available to storage buckets assets. - class ResourceSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of resource. - module Type - # Type not specified. - TYPE_UNSPECIFIED = 0 - - # Cloud Storage bucket. - STORAGE_BUCKET = 1 - - # BigQuery dataset. - BIGQUERY_DATASET = 2 - end - - # Access Mode determines how data stored within the resource is read. This - # is only applicable to storage bucket assets. - module 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 - end - end - - # Status of the resource referenced by an asset. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceStatus::State] - # The current state of the managed resource. - # @!attribute [rw] message - # @return [::String] - # Additional information about the current state. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the status. - # @!attribute [r] managed_access_identity - # @return [::String] - # Output only. Service account associated with the BigQuery Connection. - class ResourceStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of a resource. - module State - # State unspecified. - STATE_UNSPECIFIED = 0 - - # Resource does not have any errors. - READY = 1 - - # Resource has errors. - ERROR = 2 - end - end - - # Status of discovery for an asset. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus::State] - # The current status of the discovery feature. - # @!attribute [rw] message - # @return [::String] - # Additional information about the current state. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the status. - # @!attribute [rw] last_run_time - # @return [::Google::Protobuf::Timestamp] - # The start time of the last discovery run. - # @!attribute [rw] stats - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus::Stats] - # Data Stats of the asset reported by discovery. - # @!attribute [rw] last_run_duration - # @return [::Google::Protobuf::Duration] - # The duration of the last discovery run. - class DiscoveryStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The aggregated data statistics for the asset reported by discovery. - # @!attribute [rw] data_items - # @return [::Integer] - # The count of data items within the referenced resource. - # @!attribute [rw] data_size - # @return [::Integer] - # The number of stored data bytes within the referenced resource. - # @!attribute [rw] tables - # @return [::Integer] - # The count of table entities within the referenced resource. - # @!attribute [rw] filesets - # @return [::Integer] - # The count of fileset entities within the referenced resource. - class Stats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Current state of discovery. - module 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 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # State of a resource. - module 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 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb deleted file mode 100644 index 4a900722e1cc..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # ResourceAccessSpec holds the access control configuration to be enforced - # on the resources, for example, Cloud Storage bucket, BigQuery dataset, - # BigQuery table. - # @!attribute [rw] readers - # @return [::Array<::String>] - # 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. - # @!attribute [rw] writers - # @return [::Array<::String>] - # Optional. The set of principals to be granted writer role on the resource. - # @!attribute [rw] owners - # @return [::Array<::String>] - # Optional. The set of principals to be granted owner role on the resource. - class ResourceAccessSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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. - # @!attribute [rw] readers - # @return [::Array<::String>] - # 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. - class DataAccessSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb deleted file mode 100644 index 00b0c56e0f04..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb +++ /dev/null @@ -1,803 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # Create lake request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] lake_id - # @return [::String] - # 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. - # @!attribute [rw] lake - # @return [::Google::Cloud::Dataplex::V1::Lake] - # Required. Lake resource - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateLakeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update lake request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] lake - # @return [::Google::Cloud::Dataplex::V1::Lake] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateLakeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete lake request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - class DeleteLakeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List lakes request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListLakesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List lakes response. - # @!attribute [rw] lakes - # @return [::Array<::Google::Cloud::Dataplex::V1::Lake>] - # Lakes under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListLakesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List lake actions request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - class ListLakeActionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List actions response. - # @!attribute [rw] actions - # @return [::Array<::Google::Cloud::Dataplex::V1::Action>] - # Actions under the given parent lake/zone/asset. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListActionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get lake request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - class GetLakeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create zone request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] zone_id - # @return [::String] - # 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") - # @!attribute [rw] zone - # @return [::Google::Cloud::Dataplex::V1::Zone] - # Required. Zone resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update zone request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] zone - # @return [::Google::Cloud::Dataplex::V1::Zone] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete zone request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - class DeleteZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List zones request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListZonesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List zones response. - # @!attribute [rw] zones - # @return [::Array<::Google::Cloud::Dataplex::V1::Zone>] - # Zones under the given parent lake. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListZonesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List zone actions request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - class ListZoneActionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get zone request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - class GetZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create asset request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] asset_id - # @return [::String] - # 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. - # @!attribute [rw] asset - # @return [::Google::Cloud::Dataplex::V1::Asset] - # Required. Asset resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update asset request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] asset - # @return [::Google::Cloud::Dataplex::V1::Asset] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete asset request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - class DeleteAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List assets request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListAssetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List assets response. - # @!attribute [rw] assets - # @return [::Array<::Google::Cloud::Dataplex::V1::Asset>] - # Asset under the given parent zone. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListAssetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List asset actions request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - class ListAssetActionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get asset request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - class GetAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of a long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # 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`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create task request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] task_id - # @return [::String] - # Required. Task identifier. - # @!attribute [rw] task - # @return [::Google::Cloud::Dataplex::V1::Task] - # Required. Task resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update task request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] task - # @return [::Google::Cloud::Dataplex::V1::Task] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete task request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - class DeleteTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List tasks request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List tasks response. - # @!attribute [rw] tasks - # @return [::Array<::Google::Cloud::Dataplex::V1::Task>] - # Tasks under the given parent lake. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get task request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - class GetTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get job request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - class GetJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # 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. - # @!attribute [rw] args - # @return [::Google::Protobuf::Map{::String => ::String}] - # 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. - class RunTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ArgsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] job - # @return [::Google::Cloud::Dataplex::V1::Job] - # Jobs created by RunTask API. - class RunTaskResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List jobs request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - class ListJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List jobs response. - # @!attribute [rw] jobs - # @return [::Array<::Google::Cloud::Dataplex::V1::Job>] - # Jobs under a given task. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListJobsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Cancel task jobs. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - class CancelJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create environment request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] environment_id - # @return [::String] - # 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. - # @!attribute [rw] environment - # @return [::Google::Cloud::Dataplex::V1::Environment] - # Required. Environment resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateEnvironmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update environment request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] environment - # @return [::Google::Cloud::Dataplex::V1::Environment] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateEnvironmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete environment request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the environment: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - class DeleteEnvironmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List environments request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListEnvironmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List environments response. - # @!attribute [rw] environments - # @return [::Array<::Google::Cloud::Dataplex::V1::Environment>] - # Environments under the given parent lake. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListEnvironmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get environment request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the environment: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - class GetEnvironmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List sessions request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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 - class ListSessionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List sessions response. - # @!attribute [rw] sessions - # @return [::Array<::Google::Cloud::Dataplex::V1::Session>] - # Sessions under a given environment. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListSessionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb deleted file mode 100644 index b18b15ea7b54..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb +++ /dev/null @@ -1,435 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # A task represents a user-visible job. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the task, of the form: - # projects/\\{project_number}/locations/\\{location_id}/lakes/\\{lake_id}/ - # tasks/\\{task_id}. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the task was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the task was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the task. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the task. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the task. - # @!attribute [rw] trigger_spec - # @return [::Google::Cloud::Dataplex::V1::Task::TriggerSpec] - # Required. Spec related to how often and when a task should be triggered. - # @!attribute [rw] execution_spec - # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionSpec] - # Required. Spec related to how a task is executed. - # @!attribute [r] execution_status - # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionStatus] - # Output only. Status of the latest task executions. - # @!attribute [rw] spark - # @return [::Google::Cloud::Dataplex::V1::Task::SparkTaskConfig] - # Config related to running custom Spark tasks. - # @!attribute [rw] notebook - # @return [::Google::Cloud::Dataplex::V1::Task::NotebookTaskConfig] - # Config related to running scheduled Notebooks. - class Task - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for the underlying infrastructure used to run workloads. - # @!attribute [rw] batch - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::BatchComputeResources] - # Compute resources needed for a Task when using Dataproc Serverless. - # @!attribute [rw] container_image - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::ContainerImageRuntime] - # Container Image Runtime Configuration. - # @!attribute [rw] vpc_network - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::VpcNetwork] - # Vpc network. - class InfrastructureSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Batch compute resources associated with the task. - # @!attribute [rw] executors_count - # @return [::Integer] - # Optional. Total number of job executors. - # Executor Count should be between 2 and 100. [Default=2] - # @!attribute [rw] max_executors_count - # @return [::Integer] - # 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] - class BatchComputeResources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container Image Runtime Configuration used with Batch execution. - # @!attribute [rw] image - # @return [::String] - # Optional. Container image to use. - # @!attribute [rw] java_jars - # @return [::Array<::String>] - # 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 - # @!attribute [rw] python_packages - # @return [::Array<::String>] - # 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 - # @!attribute [rw] properties - # @return [::Google::Protobuf::Map{::String => ::String}] - # 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). - class ContainerImageRuntime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class PropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Cloud VPC Network used to run the infrastructure. - # @!attribute [rw] network - # @return [::String] - # Optional. The Cloud VPC network in which the job is run. By default, - # the Cloud VPC network named Default within the project is used. - # @!attribute [rw] sub_network - # @return [::String] - # Optional. The Cloud VPC sub-network in which the job is run. - # @!attribute [rw] network_tags - # @return [::Array<::String>] - # Optional. List of network tags to apply to the job. - class VpcNetwork - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Task scheduling and trigger settings. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Task::TriggerSpec::Type] - # Required. Immutable. Trigger type of the user-specified Task. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # 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. - # @!attribute [rw] disabled - # @return [::Boolean] - # Optional. Prevent the task from executing. - # This does not cancel already running tasks. It is intended to temporarily - # disable RECURRING tasks. - # @!attribute [rw] max_retries - # @return [::Integer] - # Optional. Number of retry attempts before aborting. - # Set to zero to never attempt to retry a failed task. - # @!attribute [rw] schedule - # @return [::String] - # 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. - class TriggerSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Determines how often and when the job will run. - module 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 - end - end - - # Execution related settings, like retry and service_account. - # @!attribute [rw] args - # @return [::Google::Protobuf::Map{::String => ::String}] - # 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. - # @!attribute [rw] service_account - # @return [::String] - # Required. Service account to use to execute a task. - # If not provided, the default Compute service account for the project is - # used. - # @!attribute [rw] project - # @return [::String] - # Optional. The project in which jobs are run. By default, the project - # containing the Lake is used. If a project is provided, the - # {::Google::Cloud::Dataplex::V1::Task::ExecutionSpec#service_account ExecutionSpec.service_account} - # must belong to this project. - # @!attribute [rw] max_job_execution_lifetime - # @return [::Google::Protobuf::Duration] - # Optional. The maximum duration after which the job execution is expired. - # @!attribute [rw] kms_key - # @return [::String] - # 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}`. - class ExecutionSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ArgsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # User-specified config for running a Spark task. - # @!attribute [rw] main_jar_file_uri - # @return [::String] - # 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`). - # @!attribute [rw] main_class - # @return [::String] - # 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`). - # @!attribute [rw] python_script_file - # @return [::String] - # 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`). - # @!attribute [rw] sql_script_file - # @return [::String] - # 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";`). - # @!attribute [rw] sql_script - # @return [::String] - # The query text. - # The execution args are used to declare a set of script variables - # (`set key="value";`). - # @!attribute [rw] file_uris - # @return [::Array<::String>] - # Optional. Cloud Storage URIs of files to be placed in the working - # directory of each executor. - # @!attribute [rw] archive_uris - # @return [::Array<::String>] - # 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. - # @!attribute [rw] infrastructure_spec - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec] - # Optional. Infrastructure specification for the execution. - class SparkTaskConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for running scheduled notebooks. - # @!attribute [rw] notebook - # @return [::String] - # 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`). - # @!attribute [rw] infrastructure_spec - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec] - # Optional. Infrastructure specification for the execution. - # @!attribute [rw] file_uris - # @return [::Array<::String>] - # Optional. Cloud Storage URIs of files to be placed in the working - # directory of each executor. - # @!attribute [rw] archive_uris - # @return [::Array<::String>] - # 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. - class NotebookTaskConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of the task execution (e.g. Jobs). - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update time of the status. - # @!attribute [r] latest_job - # @return [::Google::Cloud::Dataplex::V1::Job] - # Output only. latest job execution - class ExecutionStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A job represents an instance of a task. - # @!attribute [r] name - # @return [::String] - # 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}`. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the job. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the job was started. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the job ended. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::Job::State] - # Output only. Execution state for the job. - # @!attribute [r] retry_count - # @return [::Integer] - # Output only. The number of times the job has been retried (excluding the - # initial attempt). - # @!attribute [r] service - # @return [::Google::Cloud::Dataplex::V1::Job::Service] - # Output only. The underlying service running a job. - # @!attribute [r] service_job - # @return [::String] - # Output only. The full resource name for the job run under a particular - # service. - # @!attribute [r] message - # @return [::String] - # Output only. Additional information about the current state. - # @!attribute [r] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. User-defined labels for the task. - # @!attribute [r] trigger - # @return [::Google::Cloud::Dataplex::V1::Job::Trigger] - # Output only. Job execution trigger. - # @!attribute [r] execution_spec - # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionSpec] - # Output only. Spec related to how a task is executed. - class Job - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - module Service - # Service used to run the job is unspecified. - SERVICE_UNSPECIFIED = 0 - - # Dataproc service is used to run this job. - DATAPROC = 1 - end - - module 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 - end - - # Job execution trigger. - module 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 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 54b83fb82b7d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,164 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal response of the operation in case of success. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc LongRunningRecognize(LongRunningRecognizeRequest) - # returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "LongRunningRecognizeResponse" - # metadata_type: "LongRunningRecognizeMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index fb4d6862eac9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index b5731a824060..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 8c6b19d52e3d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 8e7abcf8f052..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 9e96368be9d9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,96 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 4ac9c4801a3f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index 09acc69b6125..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 41c8c3a565cc..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile deleted file mode 100644 index 886d5625e3df..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-dataplex-v1", path: "../" -else - gem "google-cloud-dataplex-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb deleted file mode 100644 index f36fc0933161..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_CreateAspectType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_aspect_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type. -# -def create_aspect_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new - - # Call the create_aspect_type method. - result = client.create_aspect_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_CreateAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb deleted file mode 100644 index 3f4ccb2d81f7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_CreateEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry. -# -def create_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new - - # Call the create_entry method. - result = client.create_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_CreateEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb deleted file mode 100644 index 376349a60218..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_CreateEntryGroup_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_entry_group call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group. -# -def create_entry_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new - - # Call the create_entry_group method. - result = client.create_entry_group request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_CreateEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb deleted file mode 100644 index 314b91f322c9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_CreateEntryType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_entry_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type. -# -def create_entry_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new - - # Call the create_entry_type method. - result = client.create_entry_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_CreateEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb deleted file mode 100644 index 362457b5a4b7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_DeleteAspectType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_aspect_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type. -# -def delete_aspect_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new - - # Call the delete_aspect_type method. - result = client.delete_aspect_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_DeleteAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb deleted file mode 100644 index 3d1fe413c62c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_DeleteEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry. -# -def delete_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new - - # Call the delete_entry method. - result = client.delete_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_DeleteEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb deleted file mode 100644 index 7246b08a556c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_entry_group call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group. -# -def delete_entry_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new - - # Call the delete_entry_group method. - result = client.delete_entry_group request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb deleted file mode 100644 index 794e94fe2f28..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_DeleteEntryType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_entry_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type. -# -def delete_entry_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new - - # Call the delete_entry_type method. - result = client.delete_entry_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_DeleteEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb deleted file mode 100644 index fd04921c117d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_GetAspectType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_aspect_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type. -# -def get_aspect_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new - - # Call the get_aspect_type method. - result = client.get_aspect_type request - - # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. - p result -end -# [END dataplex_v1_generated_CatalogService_GetAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb deleted file mode 100644 index c1abef4d1f90..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_GetEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry. -# -def get_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEntryRequest.new - - # Call the get_entry method. - result = client.get_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_GetEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb deleted file mode 100644 index 6319704f7a07..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_GetEntryGroup_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_entry_group call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group. -# -def get_entry_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new - - # Call the get_entry_group method. - result = client.get_entry_group request - - # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. - p result -end -# [END dataplex_v1_generated_CatalogService_GetEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb deleted file mode 100644 index ffb3842dffa8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_GetEntryType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_entry_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type. -# -def get_entry_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new - - # Call the get_entry_type method. - result = client.get_entry_type request - - # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. - p result -end -# [END dataplex_v1_generated_CatalogService_GetEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb deleted file mode 100644 index 8bd6fc13947e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_ListAspectTypes_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_aspect_types call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types. -# -def list_aspect_types - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new - - # Call the list_aspect_types method. - result = client.list_aspect_types request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. - p item - end -end -# [END dataplex_v1_generated_CatalogService_ListAspectTypes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb deleted file mode 100644 index 831f4b59a1d7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_ListEntries_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_entries call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries. -# -def list_entries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new - - # Call the list_entries method. - result = client.list_entries request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. - p item - end -end -# [END dataplex_v1_generated_CatalogService_ListEntries_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb deleted file mode 100644 index c43311632377..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_ListEntryGroups_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_entry_groups call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups. -# -def list_entry_groups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new - - # Call the list_entry_groups method. - result = client.list_entry_groups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. - p item - end -end -# [END dataplex_v1_generated_CatalogService_ListEntryGroups_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb deleted file mode 100644 index 6864cb0191c1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_ListEntryTypes_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_entry_types call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types. -# -def list_entry_types - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new - - # Call the list_entry_types method. - result = client.list_entry_types request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. - p item - end -end -# [END dataplex_v1_generated_CatalogService_ListEntryTypes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb deleted file mode 100644 index a0eb324209fa..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_LookupEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the lookup_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry. -# -def lookup_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new - - # Call the lookup_entry method. - result = client.lookup_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_LookupEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb deleted file mode 100644 index 0cda02b0b5ae..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_SearchEntries_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the search_entries call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries. -# -def search_entries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new - - # Call the search_entries method. - result = client.search_entries request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. - p item - end -end -# [END dataplex_v1_generated_CatalogService_SearchEntries_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb deleted file mode 100644 index 3bd635f8ae9f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_UpdateAspectType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_aspect_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type. -# -def update_aspect_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new - - # Call the update_aspect_type method. - result = client.update_aspect_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_UpdateAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb deleted file mode 100644 index 38c35bdfb614..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_UpdateEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry. -# -def update_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new - - # Call the update_entry method. - result = client.update_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_UpdateEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb deleted file mode 100644 index 14ebf2748edb..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_entry_group call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group. -# -def update_entry_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new - - # Call the update_entry_group method. - result = client.update_entry_group request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb deleted file mode 100644 index 6e84f438b832..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_UpdateEntryType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_entry_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type. -# -def update_entry_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new - - # Call the update_entry_type method. - result = client.update_entry_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_UpdateEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb deleted file mode 100644 index 9b30f42a41ad..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_CreateContent_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_content call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#create_content. -# -def create_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateContentRequest.new - - # Call the create_content method. - result = client.create_content request - - # The returned object is of type Google::Cloud::Dataplex::V1::Content. - p result -end -# [END dataplex_v1_generated_ContentService_CreateContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb deleted file mode 100644 index 2169aa8d6106..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_DeleteContent_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_content call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#delete_content. -# -def delete_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new - - # Call the delete_content method. - result = client.delete_content request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dataplex_v1_generated_ContentService_DeleteContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb deleted file mode 100644 index 45684231c227..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_GetContent_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_content call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#get_content. -# -def get_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetContentRequest.new - - # Call the get_content method. - result = client.get_content request - - # The returned object is of type Google::Cloud::Dataplex::V1::Content. - p result -end -# [END dataplex_v1_generated_ContentService_GetContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb deleted file mode 100644 index 1b54efd1b16b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_GetIamPolicy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_iam_policy call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END dataplex_v1_generated_ContentService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb deleted file mode 100644 index 180c52eb5d49..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_ListContent_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_content call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#list_content. -# -def list_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListContentRequest.new - - # Call the list_content method. - result = client.list_content request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Content. - p item - end -end -# [END dataplex_v1_generated_ContentService_ListContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb deleted file mode 100644 index fee701099ea8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_SetIamPolicy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the set_iam_policy call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END dataplex_v1_generated_ContentService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb deleted file mode 100644 index c6b913d91e9d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_TestIamPermissions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the test_iam_permissions call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END dataplex_v1_generated_ContentService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb deleted file mode 100644 index bc5ad4969c2a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_UpdateContent_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_content call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#update_content. -# -def update_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new - - # Call the update_content method. - result = client.update_content request - - # The returned object is of type Google::Cloud::Dataplex::V1::Content. - p result -end -# [END dataplex_v1_generated_ContentService_UpdateContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb deleted file mode 100644 index 7ef5da803df4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_CreateDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan. -# -def create_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new - - # Call the create_data_scan method. - result = client.create_data_scan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataScanService_CreateDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb deleted file mode 100644 index af01e019be16..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_DeleteDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan. -# -def delete_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new - - # Call the delete_data_scan method. - result = client.delete_data_scan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataScanService_DeleteDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb deleted file mode 100644 index eab1de8202ec..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the generate_data_quality_rules call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules. -# -def generate_data_quality_rules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new - - # Call the generate_data_quality_rules method. - result = client.generate_data_quality_rules request - - # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. - p result -end -# [END dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb deleted file mode 100644 index dced954461e9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_GetDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan. -# -def get_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new - - # Call the get_data_scan method. - result = client.get_data_scan request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. - p result -end -# [END dataplex_v1_generated_DataScanService_GetDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb deleted file mode 100644 index 5e2e0112253e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_GetDataScanJob_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_scan_job call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job. -# -def get_data_scan_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new - - # Call the get_data_scan_job method. - result = client.get_data_scan_job request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. - p result -end -# [END dataplex_v1_generated_DataScanService_GetDataScanJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb deleted file mode 100644 index 1c17e1599263..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_ListDataScanJobs_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_scan_jobs call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs. -# -def list_data_scan_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new - - # Call the list_data_scan_jobs method. - result = client.list_data_scan_jobs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. - p item - end -end -# [END dataplex_v1_generated_DataScanService_ListDataScanJobs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb deleted file mode 100644 index 54ffbe334d01..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_ListDataScans_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_scans call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans. -# -def list_data_scans - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new - - # Call the list_data_scans method. - result = client.list_data_scans request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. - p item - end -end -# [END dataplex_v1_generated_DataScanService_ListDataScans_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb deleted file mode 100644 index f55818ed8adc..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_RunDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the run_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan. -# -def run_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new - - # Call the run_data_scan method. - result = client.run_data_scan request - - # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. - p result -end -# [END dataplex_v1_generated_DataScanService_RunDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb deleted file mode 100644 index 7b26badc2ad8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_UpdateDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan. -# -def update_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new - - # Call the update_data_scan method. - result = client.update_data_scan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataScanService_UpdateDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb deleted file mode 100644 index 62e0e7f23812..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_data_attribute call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute. -# -def create_data_attribute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new - - # Call the create_data_attribute method. - result = client.create_data_attribute request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb deleted file mode 100644 index 5dabda7bd877..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_data_attribute_binding call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding. -# -def create_data_attribute_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new - - # Call the create_data_attribute_binding method. - result = client.create_data_attribute_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb deleted file mode 100644 index b7a056141f7c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_data_taxonomy call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy. -# -def create_data_taxonomy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new - - # Call the create_data_taxonomy method. - result = client.create_data_taxonomy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb deleted file mode 100644 index 4d84a87bda45..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_data_attribute call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute. -# -def delete_data_attribute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new - - # Call the delete_data_attribute method. - result = client.delete_data_attribute request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb deleted file mode 100644 index e970651237e0..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_data_attribute_binding call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding. -# -def delete_data_attribute_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new - - # Call the delete_data_attribute_binding method. - result = client.delete_data_attribute_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb deleted file mode 100644 index 033d8d48c223..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_data_taxonomy call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy. -# -def delete_data_taxonomy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new - - # Call the delete_data_taxonomy method. - result = client.delete_data_taxonomy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb deleted file mode 100644 index abe63f31f367..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_attribute call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute. -# -def get_data_attribute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new - - # Call the get_data_attribute method. - result = client.get_data_attribute request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. - p result -end -# [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb deleted file mode 100644 index 8c7d901dad8f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_attribute_binding call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding. -# -def get_data_attribute_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new - - # Call the get_data_attribute_binding method. - result = client.get_data_attribute_binding request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. - p result -end -# [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb deleted file mode 100644 index 7bf0cd32bd75..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_taxonomy call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy. -# -def get_data_taxonomy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new - - # Call the get_data_taxonomy method. - result = client.get_data_taxonomy request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. - p result -end -# [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb deleted file mode 100644 index fad7c5897a7d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_attribute_bindings call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings. -# -def list_data_attribute_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new - - # Call the list_data_attribute_bindings method. - result = client.list_data_attribute_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. - p item - end -end -# [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb deleted file mode 100644 index 55c9a289ae36..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_attributes call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes. -# -def list_data_attributes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new - - # Call the list_data_attributes method. - result = client.list_data_attributes request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. - p item - end -end -# [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb deleted file mode 100644 index 3e5870ec0258..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_taxonomies call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies. -# -def list_data_taxonomies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new - - # Call the list_data_taxonomies method. - result = client.list_data_taxonomies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. - p item - end -end -# [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb deleted file mode 100644 index ee672d4f9dec..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_data_attribute call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute. -# -def update_data_attribute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new - - # Call the update_data_attribute method. - result = client.update_data_attribute request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb deleted file mode 100644 index a020c8860103..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_data_attribute_binding call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding. -# -def update_data_attribute_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new - - # Call the update_data_attribute_binding method. - result = client.update_data_attribute_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb deleted file mode 100644 index 6985aff5b2c2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_data_taxonomy call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy. -# -def update_data_taxonomy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new - - # Call the update_data_taxonomy method. - result = client.update_data_taxonomy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb deleted file mode 100644 index 476f4f673938..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_CancelJob_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the cancel_job call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job. -# -def cancel_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CancelJobRequest.new - - # Call the cancel_job method. - result = client.cancel_job request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dataplex_v1_generated_DataplexService_CancelJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb deleted file mode 100644 index b830cdb49245..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_CreateAsset_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_asset call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset. -# -def create_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new - - # Call the create_asset method. - result = client.create_asset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb deleted file mode 100644 index cc4ed9ab1745..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_CreateEnvironment_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_environment call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_environment. -# -def create_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new - - # Call the create_environment method. - result = client.create_environment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb deleted file mode 100644 index 89eac2aa7769..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_CreateLake_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_lake call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake. -# -def create_lake - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new - - # Call the create_lake method. - result = client.create_lake request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb deleted file mode 100644 index a0ad46d5e011..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_CreateTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_task. -# -def create_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new - - # Call the create_task method. - result = client.create_task request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb deleted file mode 100644 index 59801ff23b87..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_CreateZone_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_zone call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone. -# -def create_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new - - # Call the create_zone method. - result = client.create_zone request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb deleted file mode 100644 index 1a298cfcc413..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_DeleteAsset_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_asset call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset. -# -def delete_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new - - # Call the delete_asset method. - result = client.delete_asset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb deleted file mode 100644 index 924fdce94a2b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_DeleteEnvironment_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_environment call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_environment. -# -def delete_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new - - # Call the delete_environment method. - result = client.delete_environment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb deleted file mode 100644 index 7e48a9f3bc20..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_DeleteLake_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_lake call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake. -# -def delete_lake - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new - - # Call the delete_lake method. - result = client.delete_lake request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb deleted file mode 100644 index aeaf3570fdda..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_DeleteTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task. -# -def delete_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new - - # Call the delete_task method. - result = client.delete_task request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb deleted file mode 100644 index f091b4f3316e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_DeleteZone_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_zone call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone. -# -def delete_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new - - # Call the delete_zone method. - result = client.delete_zone request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb deleted file mode 100644 index ece27d07087a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_GetAsset_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_asset call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset. -# -def get_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetAssetRequest.new - - # Call the get_asset method. - result = client.get_asset request - - # The returned object is of type Google::Cloud::Dataplex::V1::Asset. - p result -end -# [END dataplex_v1_generated_DataplexService_GetAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb deleted file mode 100644 index 3273a7e0da3a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_GetEnvironment_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_environment call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_environment. -# -def get_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new - - # Call the get_environment method. - result = client.get_environment request - - # The returned object is of type Google::Cloud::Dataplex::V1::Environment. - p result -end -# [END dataplex_v1_generated_DataplexService_GetEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb deleted file mode 100644 index 26f9422acca1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_GetJob_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_job call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_job. -# -def get_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetJobRequest.new - - # Call the get_job method. - result = client.get_job request - - # The returned object is of type Google::Cloud::Dataplex::V1::Job. - p result -end -# [END dataplex_v1_generated_DataplexService_GetJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb deleted file mode 100644 index 68cf80ffd32a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_GetLake_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_lake call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake. -# -def get_lake - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetLakeRequest.new - - # Call the get_lake method. - result = client.get_lake request - - # The returned object is of type Google::Cloud::Dataplex::V1::Lake. - p result -end -# [END dataplex_v1_generated_DataplexService_GetLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb deleted file mode 100644 index b23744f5aba3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_GetTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_task. -# -def get_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetTaskRequest.new - - # Call the get_task method. - result = client.get_task request - - # The returned object is of type Google::Cloud::Dataplex::V1::Task. - p result -end -# [END dataplex_v1_generated_DataplexService_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb deleted file mode 100644 index 5773281a042c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_GetZone_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_zone call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone. -# -def get_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetZoneRequest.new - - # Call the get_zone method. - result = client.get_zone request - - # The returned object is of type Google::Cloud::Dataplex::V1::Zone. - p result -end -# [END dataplex_v1_generated_DataplexService_GetZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb deleted file mode 100644 index 3de45de0692c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListAssetActions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_asset_actions call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions. -# -def list_asset_actions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new - - # Call the list_asset_actions method. - result = client.list_asset_actions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListAssetActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb deleted file mode 100644 index d45ce372dfbe..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListAssets_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_assets call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets. -# -def list_assets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new - - # Call the list_assets method. - result = client.list_assets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb deleted file mode 100644 index e3b8760b21d3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListEnvironments_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_environments call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_environments. -# -def list_environments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new - - # Call the list_environments method. - result = client.list_environments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Environment. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListEnvironments_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb deleted file mode 100644 index 6d71874cd9e5..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListJobs_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_jobs call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs. -# -def list_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListJobsRequest.new - - # Call the list_jobs method. - result = client.list_jobs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Job. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListJobs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb deleted file mode 100644 index 2cbe46f9ec50..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListLakeActions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_lake_actions call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions. -# -def list_lake_actions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new - - # Call the list_lake_actions method. - result = client.list_lake_actions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListLakeActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb deleted file mode 100644 index 32b87c2dd3af..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListLakes_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_lakes call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes. -# -def list_lakes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListLakesRequest.new - - # Call the list_lakes method. - result = client.list_lakes request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListLakes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb deleted file mode 100644 index 04d0ae4da992..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListSessions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_sessions call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_sessions. -# -def list_sessions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new - - # Call the list_sessions method. - result = client.list_sessions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Session. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListSessions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb deleted file mode 100644 index 41affa17810a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListTasks_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_tasks call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks. -# -def list_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListTasksRequest.new - - # Call the list_tasks method. - result = client.list_tasks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Task. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb deleted file mode 100644 index c6ab49811f0e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListZoneActions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_zone_actions call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions. -# -def list_zone_actions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new - - # Call the list_zone_actions method. - result = client.list_zone_actions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListZoneActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb deleted file mode 100644 index aba04972dae0..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListZones_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_zones call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones. -# -def list_zones - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListZonesRequest.new - - # Call the list_zones method. - result = client.list_zones request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListZones_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb deleted file mode 100644 index bf51744559b6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_RunTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the run_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#run_task. -# -def run_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::RunTaskRequest.new - - # Call the run_task method. - result = client.run_task request - - # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. - p result -end -# [END dataplex_v1_generated_DataplexService_RunTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb deleted file mode 100644 index 07a02bd339b9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_UpdateAsset_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_asset call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset. -# -def update_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new - - # Call the update_asset method. - result = client.update_asset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb deleted file mode 100644 index bf327a685bca..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_UpdateEnvironment_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_environment call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_environment. -# -def update_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new - - # Call the update_environment method. - result = client.update_environment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb deleted file mode 100644 index d4dda821cac2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_UpdateLake_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_lake call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake. -# -def update_lake - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new - - # Call the update_lake method. - result = client.update_lake request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb deleted file mode 100644 index 3440b1c8c05e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_UpdateTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_task. -# -def update_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new - - # Call the update_task method. - result = client.update_task request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb deleted file mode 100644 index 9ab74438a946..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_UpdateZone_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_zone call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone. -# -def update_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new - - # Call the update_zone method. - result = client.update_zone request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb deleted file mode 100644 index f19b23bf2929..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_CreateEntity_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_entity call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity. -# -def create_entity - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEntityRequest.new - - # Call the create_entity method. - result = client.create_entity request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - p result -end -# [END dataplex_v1_generated_MetadataService_CreateEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb deleted file mode 100644 index 7eaff8ebc340..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_CreatePartition_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_partition call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition. -# -def create_partition - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new - - # Call the create_partition method. - result = client.create_partition request - - # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - p result -end -# [END dataplex_v1_generated_MetadataService_CreatePartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb deleted file mode 100644 index 6269c6757544..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_DeleteEntity_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_entity call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity. -# -def delete_entity - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new - - # Call the delete_entity method. - result = client.delete_entity request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dataplex_v1_generated_MetadataService_DeleteEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb deleted file mode 100644 index 31b484f3720d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_DeletePartition_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_partition call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition. -# -def delete_partition - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new - - # Call the delete_partition method. - result = client.delete_partition request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dataplex_v1_generated_MetadataService_DeletePartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb deleted file mode 100644 index 9d31a3e13b07..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_GetEntity_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_entity call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity. -# -def get_entity - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEntityRequest.new - - # Call the get_entity method. - result = client.get_entity request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - p result -end -# [END dataplex_v1_generated_MetadataService_GetEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb deleted file mode 100644 index 278958c7dba3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_GetPartition_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_partition call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition. -# -def get_partition - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new - - # Call the get_partition method. - result = client.get_partition request - - # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - p result -end -# [END dataplex_v1_generated_MetadataService_GetPartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb deleted file mode 100644 index a584b2b7d4df..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_ListEntities_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_entities call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities. -# -def list_entities - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new - - # Call the list_entities method. - result = client.list_entities request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. - p item - end -end -# [END dataplex_v1_generated_MetadataService_ListEntities_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb deleted file mode 100644 index b956ff846f47..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_ListPartitions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_partitions call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions. -# -def list_partitions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new - - # Call the list_partitions method. - result = client.list_partitions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. - p item - end -end -# [END dataplex_v1_generated_MetadataService_ListPartitions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb deleted file mode 100644 index 78a3c2e43ade..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_UpdateEntity_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_entity call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity. -# -def update_entity - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new - - # Call the update_entity method. - result = client.update_entity request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - p result -end -# [END dataplex_v1_generated_MetadataService_UpdateEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json b/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json deleted file mode 100644 index e45d8ca85b2e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json +++ /dev/null @@ -1,3855 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-dataplex-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.dataplex.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "dataplex_v1_generated_DataplexService_CreateLake_sync", - "title": "Snippet for the create_lake call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake.", - "file": "dataplex_service/create_lake.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_lake", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateLakeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CreateLake", - "full_name": "google.cloud.dataplex.v1.DataplexService.CreateLake", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_UpdateLake_sync", - "title": "Snippet for the update_lake call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake.", - "file": "dataplex_service/update_lake.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_lake", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateLakeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "UpdateLake", - "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateLake", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_DeleteLake_sync", - "title": "Snippet for the delete_lake call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake.", - "file": "dataplex_service/delete_lake.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_lake", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteLakeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "DeleteLake", - "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteLake", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListLakes_sync", - "title": "Snippet for the list_lakes call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes.", - "file": "dataplex_service/list_lakes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lakes", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListLakesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListLakesResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListLakes", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListLakes", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetLake_sync", - "title": "Snippet for the get_lake call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake.", - "file": "dataplex_service/get_lake.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lake", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetLakeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Lake", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetLake", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetLake", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListLakeActions_sync", - "title": "Snippet for the list_lake_actions call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions.", - "file": "dataplex_service/list_lake_actions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lake_actions", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListLakeActionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListLakeActions", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_CreateZone_sync", - "title": "Snippet for the create_zone call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone.", - "file": "dataplex_service/create_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_zone", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CreateZone", - "full_name": "google.cloud.dataplex.v1.DataplexService.CreateZone", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_UpdateZone_sync", - "title": "Snippet for the update_zone call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone.", - "file": "dataplex_service/update_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_zone", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "UpdateZone", - "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateZone", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_DeleteZone_sync", - "title": "Snippet for the delete_zone call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone.", - "file": "dataplex_service/delete_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_zone", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "DeleteZone", - "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteZone", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListZones_sync", - "title": "Snippet for the list_zones call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones.", - "file": "dataplex_service/list_zones.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_zones", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListZonesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListZonesResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListZones", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListZones", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetZone_sync", - "title": "Snippet for the get_zone call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone.", - "file": "dataplex_service/get_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_zone", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Zone", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetZone", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetZone", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListZoneActions_sync", - "title": "Snippet for the list_zone_actions call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions.", - "file": "dataplex_service/list_zone_actions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_zone_actions", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListZoneActionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListZoneActions", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_CreateAsset_sync", - "title": "Snippet for the create_asset call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset.", - "file": "dataplex_service/create_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_asset", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CreateAsset", - "full_name": "google.cloud.dataplex.v1.DataplexService.CreateAsset", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_UpdateAsset_sync", - "title": "Snippet for the update_asset call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset.", - "file": "dataplex_service/update_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_asset", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "UpdateAsset", - "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_DeleteAsset_sync", - "title": "Snippet for the delete_asset call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset.", - "file": "dataplex_service/delete_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_asset", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "DeleteAsset", - "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListAssets_sync", - "title": "Snippet for the list_assets call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets.", - "file": "dataplex_service/list_assets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_assets", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListAssetsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListAssets", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListAssets", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetAsset_sync", - "title": "Snippet for the get_asset call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset.", - "file": "dataplex_service/get_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_asset", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Asset", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetAsset", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetAsset", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListAssetActions_sync", - "title": "Snippet for the list_asset_actions call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions.", - "file": "dataplex_service/list_asset_actions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_asset_actions", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListAssetActionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListAssetActions", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_CreateTask_sync", - "title": "Snippet for the create_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_task.", - "file": "dataplex_service/create_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CreateTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.CreateTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_UpdateTask_sync", - "title": "Snippet for the update_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_task.", - "file": "dataplex_service/update_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "UpdateTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_DeleteTask_sync", - "title": "Snippet for the delete_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task.", - "file": "dataplex_service/delete_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "DeleteTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListTasks_sync", - "title": "Snippet for the list_tasks call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks.", - "file": "dataplex_service/list_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tasks", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListTasksResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListTasks", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListTasks", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetTask_sync", - "title": "Snippet for the get_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_task.", - "file": "dataplex_service/get_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Task", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListJobs_sync", - "title": "Snippet for the list_jobs call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs.", - "file": "dataplex_service/list_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_jobs", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListJobsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListJobs", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListJobs", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_RunTask_sync", - "title": "Snippet for the run_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#run_task.", - "file": "dataplex_service/run_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#run_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::RunTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::RunTaskResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "RunTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.RunTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetJob_sync", - "title": "Snippet for the get_job call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_job.", - "file": "dataplex_service/get_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_job", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Job", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetJob", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetJob", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_CancelJob_sync", - "title": "Snippet for the cancel_job call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job.", - "file": "dataplex_service/cancel_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "cancel_job", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CancelJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CancelJob", - "full_name": "google.cloud.dataplex.v1.DataplexService.CancelJob", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_CreateEnvironment_sync", - "title": "Snippet for the create_environment call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_environment.", - "file": "dataplex_service/create_environment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_environment", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_environment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CreateEnvironment", - "full_name": "google.cloud.dataplex.v1.DataplexService.CreateEnvironment", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_UpdateEnvironment_sync", - "title": "Snippet for the update_environment call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_environment.", - "file": "dataplex_service/update_environment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_environment", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_environment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "UpdateEnvironment", - "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateEnvironment", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_DeleteEnvironment_sync", - "title": "Snippet for the delete_environment call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_environment.", - "file": "dataplex_service/delete_environment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_environment", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_environment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "DeleteEnvironment", - "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteEnvironment", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListEnvironments_sync", - "title": "Snippet for the list_environments call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_environments.", - "file": "dataplex_service/list_environments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_environments", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_environments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListEnvironments", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListEnvironments", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetEnvironment_sync", - "title": "Snippet for the get_environment call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_environment.", - "file": "dataplex_service/get_environment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_environment", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_environment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEnvironmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Environment", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetEnvironment", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetEnvironment", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListSessions_sync", - "title": "Snippet for the list_sessions call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_sessions.", - "file": "dataplex_service/list_sessions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sessions", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_sessions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListSessionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListSessionsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListSessions", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListSessions", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_CreateEntryType_sync", - "title": "Snippet for the create_entry_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type.", - "file": "catalog_service/create_entry_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_entry_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "CreateEntryType", - "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntryType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntryType_sync", - "title": "Snippet for the update_entry_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type.", - "file": "catalog_service/update_entry_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_entry_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "UpdateEntryType", - "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntryType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntryType_sync", - "title": "Snippet for the delete_entry_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type.", - "file": "catalog_service/delete_entry_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_entry_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "DeleteEntryType", - "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntryType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_ListEntryTypes_sync", - "title": "Snippet for the list_entry_types call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types.", - "file": "catalog_service/list_entry_types.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_entry_types", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEntryTypesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEntryTypesResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "ListEntryTypes", - "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntryTypes", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_GetEntryType_sync", - "title": "Snippet for the get_entry_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type.", - "file": "catalog_service/get_entry_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_entry_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEntryTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::EntryType", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "GetEntryType", - "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntryType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_CreateAspectType_sync", - "title": "Snippet for the create_aspect_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type.", - "file": "catalog_service/create_aspect_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_aspect_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "CreateAspectType", - "full_name": "google.cloud.dataplex.v1.CatalogService.CreateAspectType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_UpdateAspectType_sync", - "title": "Snippet for the update_aspect_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type.", - "file": "catalog_service/update_aspect_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_aspect_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "UpdateAspectType", - "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateAspectType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_DeleteAspectType_sync", - "title": "Snippet for the delete_aspect_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type.", - "file": "catalog_service/delete_aspect_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_aspect_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "DeleteAspectType", - "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteAspectType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_ListAspectTypes_sync", - "title": "Snippet for the list_aspect_types call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types.", - "file": "catalog_service/list_aspect_types.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_aspect_types", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListAspectTypesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListAspectTypesResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "ListAspectTypes", - "full_name": "google.cloud.dataplex.v1.CatalogService.ListAspectTypes", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_GetAspectType_sync", - "title": "Snippet for the get_aspect_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type.", - "file": "catalog_service/get_aspect_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_aspect_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetAspectTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::AspectType", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "GetAspectType", - "full_name": "google.cloud.dataplex.v1.CatalogService.GetAspectType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_CreateEntryGroup_sync", - "title": "Snippet for the create_entry_group call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group.", - "file": "catalog_service/create_entry_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_entry_group", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "CreateEntryGroup", - "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntryGroup", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync", - "title": "Snippet for the update_entry_group call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group.", - "file": "catalog_service/update_entry_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_entry_group", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "UpdateEntryGroup", - "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntryGroup", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync", - "title": "Snippet for the delete_entry_group call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group.", - "file": "catalog_service/delete_entry_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_entry_group", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "DeleteEntryGroup", - "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntryGroup", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_ListEntryGroups_sync", - "title": "Snippet for the list_entry_groups call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups.", - "file": "catalog_service/list_entry_groups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_entry_groups", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "ListEntryGroups", - "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntryGroups", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_GetEntryGroup_sync", - "title": "Snippet for the get_entry_group call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group.", - "file": "catalog_service/get_entry_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_entry_group", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEntryGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::EntryGroup", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "GetEntryGroup", - "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntryGroup", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_CreateEntry_sync", - "title": "Snippet for the create_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry.", - "file": "catalog_service/create_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "CreateEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntry_sync", - "title": "Snippet for the update_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry.", - "file": "catalog_service/update_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "UpdateEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntry_sync", - "title": "Snippet for the delete_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry.", - "file": "catalog_service/delete_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "DeleteEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_ListEntries_sync", - "title": "Snippet for the list_entries call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries.", - "file": "catalog_service/list_entries.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_entries", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEntriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEntriesResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "ListEntries", - "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntries", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_GetEntry_sync", - "title": "Snippet for the get_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry.", - "file": "catalog_service/get_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "GetEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_LookupEntry_sync", - "title": "Snippet for the lookup_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry.", - "file": "catalog_service/lookup_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "lookup_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::LookupEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "LookupEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.LookupEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_SearchEntries_sync", - "title": "Snippet for the search_entries call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries.", - "file": "catalog_service/search_entries.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_entries", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::SearchEntriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::SearchEntriesResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "SearchEntries", - "full_name": "google.cloud.dataplex.v1.CatalogService.SearchEntries", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_CreateContent_sync", - "title": "Snippet for the create_content call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#create_content.", - "file": "content_service/create_content.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#create_content", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateContentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Content", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "CreateContent", - "full_name": "google.cloud.dataplex.v1.ContentService.CreateContent", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_UpdateContent_sync", - "title": "Snippet for the update_content call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#update_content.", - "file": "content_service/update_content.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#update_content", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateContentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Content", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "UpdateContent", - "full_name": "google.cloud.dataplex.v1.ContentService.UpdateContent", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_DeleteContent_sync", - "title": "Snippet for the delete_content call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#delete_content.", - "file": "content_service/delete_content.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#delete_content", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteContentRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "DeleteContent", - "full_name": "google.cloud.dataplex.v1.ContentService.DeleteContent", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_GetContent_sync", - "title": "Snippet for the get_content call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#get_content.", - "file": "content_service/get_content.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#get_content", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetContentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Content", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "GetContent", - "full_name": "google.cloud.dataplex.v1.ContentService.GetContent", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#get_iam_policy.", - "file": "content_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.dataplex.v1.ContentService.GetIamPolicy", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#set_iam_policy.", - "file": "content_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.dataplex.v1.ContentService.SetIamPolicy", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#test_iam_permissions.", - "file": "content_service/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.dataplex.v1.ContentService.TestIamPermissions", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_ListContent_sync", - "title": "Snippet for the list_content call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#list_content.", - "file": "content_service/list_content.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#list_content", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListContentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListContentResponse", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "ListContent", - "full_name": "google.cloud.dataplex.v1.ContentService.ListContent", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync", - "title": "Snippet for the create_data_taxonomy call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy.", - "file": "data_taxonomy_service/create_data_taxonomy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_taxonomy", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "CreateDataTaxonomy", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataTaxonomy", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync", - "title": "Snippet for the update_data_taxonomy call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy.", - "file": "data_taxonomy_service/update_data_taxonomy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_taxonomy", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "UpdateDataTaxonomy", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataTaxonomy", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync", - "title": "Snippet for the delete_data_taxonomy call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy.", - "file": "data_taxonomy_service/delete_data_taxonomy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_taxonomy", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "DeleteDataTaxonomy", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataTaxonomy", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync", - "title": "Snippet for the list_data_taxonomies call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies.", - "file": "data_taxonomy_service/list_data_taxonomies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_taxonomies", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "ListDataTaxonomies", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataTaxonomies", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync", - "title": "Snippet for the get_data_taxonomy call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy.", - "file": "data_taxonomy_service/get_data_taxonomy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_taxonomy", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataTaxonomy", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "GetDataTaxonomy", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataTaxonomy", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync", - "title": "Snippet for the create_data_attribute_binding call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding.", - "file": "data_taxonomy_service/create_data_attribute_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_attribute_binding", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "CreateDataAttributeBinding", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeBinding", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync", - "title": "Snippet for the update_data_attribute_binding call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding.", - "file": "data_taxonomy_service/update_data_attribute_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_attribute_binding", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "UpdateDataAttributeBinding", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeBinding", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync", - "title": "Snippet for the delete_data_attribute_binding call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding.", - "file": "data_taxonomy_service/delete_data_attribute_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_attribute_binding", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "DeleteDataAttributeBinding", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeBinding", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync", - "title": "Snippet for the list_data_attribute_bindings call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings.", - "file": "data_taxonomy_service/list_data_attribute_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_attribute_bindings", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "ListDataAttributeBindings", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributeBindings", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync", - "title": "Snippet for the get_data_attribute_binding call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding.", - "file": "data_taxonomy_service/get_data_attribute_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_attribute_binding", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataAttributeBinding", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "GetDataAttributeBinding", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeBinding", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync", - "title": "Snippet for the create_data_attribute call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute.", - "file": "data_taxonomy_service/create_data_attribute.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_attribute", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "CreateDataAttribute", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttribute", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync", - "title": "Snippet for the update_data_attribute call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute.", - "file": "data_taxonomy_service/update_data_attribute.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_attribute", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "UpdateDataAttribute", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttribute", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync", - "title": "Snippet for the delete_data_attribute call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute.", - "file": "data_taxonomy_service/delete_data_attribute.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_attribute", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "DeleteDataAttribute", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttribute", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync", - "title": "Snippet for the list_data_attributes call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes.", - "file": "data_taxonomy_service/list_data_attributes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_attributes", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataAttributesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataAttributesResponse", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "ListDataAttributes", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributes", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync", - "title": "Snippet for the get_data_attribute call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute.", - "file": "data_taxonomy_service/get_data_attribute.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_attribute", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataAttributeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataAttribute", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "GetDataAttribute", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttribute", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_CreateDataScan_sync", - "title": "Snippet for the create_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan.", - "file": "data_scan_service/create_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "CreateDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.CreateDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_UpdateDataScan_sync", - "title": "Snippet for the update_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan.", - "file": "data_scan_service/update_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "UpdateDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.UpdateDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_DeleteDataScan_sync", - "title": "Snippet for the delete_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan.", - "file": "data_scan_service/delete_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "DeleteDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.DeleteDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_GetDataScan_sync", - "title": "Snippet for the get_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan.", - "file": "data_scan_service/get_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataScan", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "GetDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.GetDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_ListDataScans_sync", - "title": "Snippet for the list_data_scans call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans.", - "file": "data_scan_service/list_data_scans.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_scans", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataScansRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataScansResponse", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "ListDataScans", - "full_name": "google.cloud.dataplex.v1.DataScanService.ListDataScans", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_RunDataScan_sync", - "title": "Snippet for the run_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan.", - "file": "data_scan_service/run_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::RunDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::RunDataScanResponse", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "RunDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.RunDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_GetDataScanJob_sync", - "title": "Snippet for the get_data_scan_job call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job.", - "file": "data_scan_service/get_data_scan_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_scan_job", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataScanJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataScanJob", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "GetDataScanJob", - "full_name": "google.cloud.dataplex.v1.DataScanService.GetDataScanJob", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_ListDataScanJobs_sync", - "title": "Snippet for the list_data_scan_jobs call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs.", - "file": "data_scan_service/list_data_scan_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_scan_jobs", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "ListDataScanJobs", - "full_name": "google.cloud.dataplex.v1.DataScanService.ListDataScanJobs", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync", - "title": "Snippet for the generate_data_quality_rules call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules.", - "file": "data_scan_service/generate_data_quality_rules.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_data_quality_rules", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "GenerateDataQualityRules", - "full_name": "google.cloud.dataplex.v1.DataScanService.GenerateDataQualityRules", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_CreateEntity_sync", - "title": "Snippet for the create_entity call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity.", - "file": "metadata_service/create_entity.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_entity", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEntityRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entity", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "CreateEntity", - "full_name": "google.cloud.dataplex.v1.MetadataService.CreateEntity", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_UpdateEntity_sync", - "title": "Snippet for the update_entity call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity.", - "file": "metadata_service/update_entity.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_entity", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEntityRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entity", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "UpdateEntity", - "full_name": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_DeleteEntity_sync", - "title": "Snippet for the delete_entity call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity.", - "file": "metadata_service/delete_entity.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_entity", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEntityRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "DeleteEntity", - "full_name": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_GetEntity_sync", - "title": "Snippet for the get_entity call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity.", - "file": "metadata_service/get_entity.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_entity", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEntityRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entity", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "GetEntity", - "full_name": "google.cloud.dataplex.v1.MetadataService.GetEntity", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_ListEntities_sync", - "title": "Snippet for the list_entities call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities.", - "file": "metadata_service/list_entities.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_entities", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEntitiesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEntitiesResponse", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "ListEntities", - "full_name": "google.cloud.dataplex.v1.MetadataService.ListEntities", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_CreatePartition_sync", - "title": "Snippet for the create_partition call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition.", - "file": "metadata_service/create_partition.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_partition", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreatePartitionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Partition", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "CreatePartition", - "full_name": "google.cloud.dataplex.v1.MetadataService.CreatePartition", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_DeletePartition_sync", - "title": "Snippet for the delete_partition call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition.", - "file": "metadata_service/delete_partition.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_partition", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeletePartitionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "DeletePartition", - "full_name": "google.cloud.dataplex.v1.MetadataService.DeletePartition", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_GetPartition_sync", - "title": "Snippet for the get_partition call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition.", - "file": "metadata_service/get_partition.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_partition", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetPartitionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Partition", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "GetPartition", - "full_name": "google.cloud.dataplex.v1.MetadataService.GetPartition", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_ListPartitions_sync", - "title": "Snippet for the list_partitions call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions.", - "file": "metadata_service/list_partitions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_partitions", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListPartitionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListPartitionsResponse", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "ListPartitions", - "full_name": "google.cloud.dataplex.v1.MetadataService.ListPartitions", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb deleted file mode 100644 index d65a7794ef93..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb +++ /dev/null @@ -1,389 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/catalog_pb" -require "google/cloud/dataplex/v1/catalog_services_pb" -require "google/cloud/dataplex/v1/catalog_service" - -class ::Google::Cloud::Dataplex::V1::CatalogService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb deleted file mode 100644 index c1f09a9564e2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb +++ /dev/null @@ -1,95 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/catalog_service" - -class ::Google::Cloud::Dataplex::V1::CatalogService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_aspect_type_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.aspect_type_path project: "value0", location: "value1", aspect_type: "value2" - assert_equal "projects/value0/locations/value1/aspectTypes/value2", path - end - end - - def test_entry_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entry_path project: "value0", location: "value1", entry_group: "value2", entry: "value3" - assert_equal "projects/value0/locations/value1/entryGroups/value2/entries/value3", path - end - end - - def test_entry_group_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entry_group_path project: "value0", location: "value1", entry_group: "value2" - assert_equal "projects/value0/locations/value1/entryGroups/value2", path - end - end - - def test_entry_type_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entry_type_path project: "value0", location: "value1", entry_type: "value2" - assert_equal "projects/value0/locations/value1/entryTypes/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb deleted file mode 100644 index 9d3d20667729..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb +++ /dev/null @@ -1,1330 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/dataplex/v1/catalog_pb" -require "google/cloud/dataplex/v1/catalog_service/rest" - - -class ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_entry_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_type_id = "hello world" - entry_type = {} - validate_only = true - - create_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_entry_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_entry_type parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_entry_type ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_entry_type(::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_entry_type_client_stub.call_count - end - end - end - - def test_update_entry_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - entry_type = {} - update_mask = {} - validate_only = true - - update_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_entry_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_entry_type entry_type: entry_type, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_entry_type ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_entry_type(::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_entry_type_client_stub.call_count - end - end - end - - def test_delete_entry_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_entry_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_entry_type({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_entry_type name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_entry_type ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_entry_type({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_entry_type(::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_entry_type_client_stub.call_count - end - end - end - - def test_list_entry_types - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_entry_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_entry_types_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_entry_types_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_entry_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_entry_types ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_entry_types(::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_entry_types_client_stub.call_count - end - end - end - - def test_get_entry_type - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::EntryType.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_entry_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_entry_type({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_entry_type name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_entry_type ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_entry_type({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_entry_type(::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_entry_type_client_stub.call_count - end - end - end - - def test_create_aspect_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - aspect_type_id = "hello world" - aspect_type = {} - validate_only = true - - create_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_aspect_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_aspect_type parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_aspect_type ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_aspect_type(::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_aspect_type_client_stub.call_count - end - end - end - - def test_update_aspect_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - aspect_type = {} - update_mask = {} - validate_only = true - - update_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_aspect_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_aspect_type aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_aspect_type ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_aspect_type(::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_aspect_type_client_stub.call_count - end - end - end - - def test_delete_aspect_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_aspect_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_aspect_type({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_aspect_type name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_aspect_type ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_aspect_type({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_aspect_type(::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_aspect_type_client_stub.call_count - end - end - end - - def test_list_aspect_types - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_aspect_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_aspect_types_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_aspect_types_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_aspect_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_aspect_types ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_aspect_types(::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_aspect_types_client_stub.call_count - end - end - end - - def test_get_aspect_type - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::AspectType.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_aspect_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_aspect_type({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_aspect_type name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_aspect_type ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_aspect_type({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_aspect_type(::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_aspect_type_client_stub.call_count - end - end - end - - def test_create_entry_group - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_group_id = "hello world" - entry_group = {} - validate_only = true - - create_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_entry_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_entry_group parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_entry_group ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_entry_group(::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_entry_group_client_stub.call_count - end - end - end - - def test_update_entry_group - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - entry_group = {} - update_mask = {} - validate_only = true - - update_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_entry_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_entry_group entry_group: entry_group, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_entry_group ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_entry_group(::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_entry_group_client_stub.call_count - end - end - end - - def test_delete_entry_group - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_entry_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_entry_group({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_entry_group name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_entry_group ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_entry_group({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_entry_group(::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_entry_group_client_stub.call_count - end - end - end - - def test_list_entry_groups - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_entry_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_entry_groups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_entry_groups_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_entry_groups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_entry_groups ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_entry_groups(::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_entry_groups_client_stub.call_count - end - end - end - - def test_get_entry_group - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::EntryGroup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_entry_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_entry_group({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_entry_group name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_entry_group ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_entry_group({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_entry_group(::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_entry_group_client_stub.call_count - end - end - end - - def test_create_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_id = "hello world" - entry = {} - - create_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_entry parent: parent, entry_id: entry_id, entry: entry do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_entry ::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_entry(::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_entry_client_stub.call_count - end - end - end - - def test_update_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - entry = {} - update_mask = {} - allow_missing = true - delete_missing_aspects = true - aspect_keys = ["hello world"] - - update_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_entry entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_entry ::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_entry(::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_entry_client_stub.call_count - end - end - end - - def test_delete_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_entry({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_entry name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_entry ::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_entry({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_entry(::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_entry_client_stub.call_count - end - end - end - - def test_list_entries - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_entries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_entries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_entries_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_entries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_entries ::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_entries(::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_entries_client_stub.call_count - end - end - end - - def test_get_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTRY_VIEW_UNSPECIFIED - aspect_types = ["hello world"] - paths = ["hello world"] - - get_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_entry name: name, view: view, aspect_types: aspect_types, paths: paths do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_entry ::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_entry(::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_entry_client_stub.call_count - end - end - end - - def test_lookup_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTRY_VIEW_UNSPECIFIED - aspect_types = ["hello world"] - paths = ["hello world"] - entry = "hello world" - - lookup_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_lookup_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, lookup_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.lookup_entry name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.lookup_entry ::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.lookup_entry(::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, lookup_entry_client_stub.call_count - end - end - end - - def test_search_entries - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - scope = "hello world" - - search_entries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_search_entries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_entries_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_entries_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb deleted file mode 100644 index 9d74d6473f35..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb +++ /dev/null @@ -1,1538 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/catalog_pb" -require "google/cloud/dataplex/v1/catalog_services_pb" -require "google/cloud/dataplex/v1/catalog_service" - -class ::Google::Cloud::Dataplex::V1::CatalogService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_entry_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_type_id = "hello world" - entry_type = {} - validate_only = true - - create_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_entry_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["entry_type_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryType), request["entry_type"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_entry_type parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_entry_type ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_entry_type(::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_entry_type_client_stub.call_rpc_count - end - end - - def test_update_entry_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - entry_type = {} - update_mask = {} - validate_only = true - - update_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_entry_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryType), request["entry_type"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_entry_type entry_type: entry_type, update_mask: update_mask, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_entry_type ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_entry_type(::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_entry_type_client_stub.call_rpc_count - end - end - - def test_delete_entry_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_entry_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_entry_type({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_entry_type name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_entry_type ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_entry_type({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_entry_type(::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_entry_type_client_stub.call_rpc_count - end - end - - def test_list_entry_types - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_entry_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_entry_types, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_entry_types_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_entry_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_entry_types ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_entry_types(::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_entry_types_client_stub.call_rpc_count - end - end - - def test_get_entry_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::EntryType.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_entry_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_entry_type({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_entry_type name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_entry_type ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_entry_type({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_entry_type(::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_entry_type_client_stub.call_rpc_count - end - end - - def test_create_aspect_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - aspect_type_id = "hello world" - aspect_type = {} - validate_only = true - - create_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_aspect_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["aspect_type_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::AspectType), request["aspect_type"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_aspect_type parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_aspect_type ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_aspect_type(::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_aspect_type_client_stub.call_rpc_count - end - end - - def test_update_aspect_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - aspect_type = {} - update_mask = {} - validate_only = true - - update_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_aspect_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::AspectType), request["aspect_type"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_aspect_type aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_aspect_type ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_aspect_type(::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_aspect_type_client_stub.call_rpc_count - end - end - - def test_delete_aspect_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_aspect_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_aspect_type({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_aspect_type name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_aspect_type ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_aspect_type({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_aspect_type(::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_aspect_type_client_stub.call_rpc_count - end - end - - def test_list_aspect_types - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_aspect_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_aspect_types, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_aspect_types_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_aspect_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_aspect_types ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_aspect_types(::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_aspect_types_client_stub.call_rpc_count - end - end - - def test_get_aspect_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::AspectType.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_aspect_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_aspect_type({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_aspect_type name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_aspect_type ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_aspect_type({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_aspect_type(::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_aspect_type_client_stub.call_rpc_count - end - end - - def test_create_entry_group - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_group_id = "hello world" - entry_group = {} - validate_only = true - - create_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_entry_group, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["entry_group_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryGroup), request["entry_group"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_entry_group parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_entry_group ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_entry_group(::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_entry_group_client_stub.call_rpc_count - end - end - - def test_update_entry_group - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - entry_group = {} - update_mask = {} - validate_only = true - - update_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_entry_group, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryGroup), request["entry_group"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_entry_group entry_group: entry_group, update_mask: update_mask, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_entry_group ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_entry_group(::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_entry_group_client_stub.call_rpc_count - end - end - - def test_delete_entry_group - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_entry_group, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_entry_group({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_entry_group name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_entry_group ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_entry_group({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_entry_group(::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_entry_group_client_stub.call_rpc_count - end - end - - def test_list_entry_groups - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_entry_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_entry_groups, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_entry_groups_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_entry_groups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_entry_groups ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_entry_groups(::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_entry_groups_client_stub.call_rpc_count - end - end - - def test_get_entry_group - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::EntryGroup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_entry_group, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_entry_group({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_entry_group name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_entry_group ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_entry_group({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_entry_group(::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_entry_group_client_stub.call_rpc_count - end - end - - def test_create_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_id = "hello world" - entry = {} - - create_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["entry_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entry), request["entry"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_entry parent: parent, entry_id: entry_id, entry: entry do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_entry ::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_entry(::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_entry_client_stub.call_rpc_count - end - end - - def test_update_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - entry = {} - update_mask = {} - allow_missing = true - delete_missing_aspects = true - aspect_keys = ["hello world"] - - update_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entry), request["entry"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - assert_equal true, request["delete_missing_aspects"] - assert_equal ["hello world"], request["aspect_keys"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_entry entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_entry ::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_entry(::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_entry_client_stub.call_rpc_count - end - end - - def test_delete_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_entry({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_entry name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_entry ::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_entry({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_entry(::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_entry_client_stub.call_rpc_count - end - end - - def test_list_entries - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_entries, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntriesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_entries_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_entries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_entries ::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_entries(::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_entries_client_stub.call_rpc_count - end - end - - def test_get_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTRY_VIEW_UNSPECIFIED - aspect_types = ["hello world"] - paths = ["hello world"] - - get_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryRequest, request - assert_equal "hello world", request["name"] - assert_equal :ENTRY_VIEW_UNSPECIFIED, request["view"] - assert_equal ["hello world"], request["aspect_types"] - assert_equal ["hello world"], request["paths"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_entry name: name, view: view, aspect_types: aspect_types, paths: paths do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_entry ::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_entry(::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_entry_client_stub.call_rpc_count - end - end - - def test_lookup_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTRY_VIEW_UNSPECIFIED - aspect_types = ["hello world"] - paths = ["hello world"] - entry = "hello world" - - lookup_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :lookup_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::LookupEntryRequest, request - assert_equal "hello world", request["name"] - assert_equal :ENTRY_VIEW_UNSPECIFIED, request["view"] - assert_equal ["hello world"], request["aspect_types"] - assert_equal ["hello world"], request["paths"] - assert_equal "hello world", request["entry"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, lookup_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.lookup_entry name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.lookup_entry ::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.lookup_entry(::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, lookup_entry_client_stub.call_rpc_count - end - end - - def test_search_entries - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - scope = "hello world" - - search_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_entries, name - assert_kind_of ::Google::Cloud::Dataplex::V1::SearchEntriesRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["query"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["scope"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_entries_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_entries_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration, config - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb deleted file mode 100644 index c2ea8c62284f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/content_service" - -class ::Google::Cloud::Dataplex::V1::ContentService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_content_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.content_path project: "value0", location: "value1", lake: "value2", content: "value3" - assert_equal "projects/value0/locations/value1/lakes/value2/content/value3", path - end - end - - def test_lake_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lake_path project: "value0", location: "value1", lake: "value2" - assert_equal "projects/value0/locations/value1/lakes/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb deleted file mode 100644 index a0e45dc95ec6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb +++ /dev/null @@ -1,535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/dataplex/v1/content_pb" -require "google/cloud/dataplex/v1/content_service/rest" - - -class ::Google::Cloud::Dataplex::V1::ContentService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_content - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Content.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - content = {} - validate_only = true - - create_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_create_content_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_content({ parent: parent, content: content, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_content parent: parent, content: content, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_content ::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_content({ parent: parent, content: content, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_content(::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_content_client_stub.call_count - end - end - end - - def test_update_content - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Content.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - content = {} - validate_only = true - - update_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_update_content_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_content update_mask: update_mask, content: content, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_content ::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_content(::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_content_client_stub.call_count - end - end - end - - def test_delete_content - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_delete_content_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_content({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_content name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_content ::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_content({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_content(::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_content_client_stub.call_count - end - end - end - - def test_get_content - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Content.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :CONTENT_VIEW_UNSPECIFIED - - get_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_get_content_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_content({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_content name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_content ::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_content({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_content(::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_content_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_list_content - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListContentResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_list_content_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_content parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_content ::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_content(::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_content_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb deleted file mode 100644 index 4d1b449973dd..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb +++ /dev/null @@ -1,569 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/content_pb" -require "google/cloud/dataplex/v1/content_services_pb" -require "google/cloud/dataplex/v1/content_service" - -class ::Google::Cloud::Dataplex::V1::ContentService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_content - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Content.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - content = {} - validate_only = true - - create_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_content, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateContentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Content), request["content"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_content({ parent: parent, content: content, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_content parent: parent, content: content, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_content ::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_content({ parent: parent, content: content, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_content(::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_content_client_stub.call_rpc_count - end - end - - def test_update_content - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Content.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - content = {} - validate_only = true - - update_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_content, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateContentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Content), request["content"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_content update_mask: update_mask, content: content, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_content ::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_content(::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_content_client_stub.call_rpc_count - end - end - - def test_delete_content - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_content, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteContentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_content({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_content name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_content ::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_content({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_content(::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_content_client_stub.call_rpc_count - end - end - - def test_get_content - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Content.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :CONTENT_VIEW_UNSPECIFIED - - get_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_content, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetContentRequest, request - assert_equal "hello world", request["name"] - assert_equal :CONTENT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_content({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_content name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_content ::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_content({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_content(::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_content_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_list_content - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListContentResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_content, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListContentRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_content parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_content ::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_content(::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_content_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb deleted file mode 100644 index fe360935dd72..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb +++ /dev/null @@ -1,389 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/datascans_pb" -require "google/cloud/dataplex/v1/datascans_services_pb" -require "google/cloud/dataplex/v1/data_scan_service" - -class ::Google::Cloud::Dataplex::V1::DataScanService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb deleted file mode 100644 index 38f511b8ed94..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/data_scan_service" - -class ::Google::Cloud::Dataplex::V1::DataScanService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_data_scan_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_scan_path project: "value0", location: "value1", dataScan: "value2" - assert_equal "projects/value0/locations/value1/dataScans/value2", path - end - end - - def test_data_scan_job_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_scan_job_path project: "value0", location: "value1", dataScan: "value2", job: "value3" - assert_equal "projects/value0/locations/value1/dataScans/value2/jobs/value3", path - end - end - - def test_entity_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entity_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb deleted file mode 100644 index d11b709f1ce5..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb +++ /dev/null @@ -1,591 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/dataplex/v1/datascans_pb" -require "google/cloud/dataplex/v1/data_scan_service/rest" - - -class ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_data_scan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_scan = {} - data_scan_id = "hello world" - validate_only = true - - create_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_create_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_scan parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_scan ::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_scan(::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_scan_client_stub.call_count - end - end - end - - def test_update_data_scan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_scan = {} - update_mask = {} - validate_only = true - - update_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_update_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_scan data_scan: data_scan, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_scan ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_scan(::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_scan_client_stub.call_count - end - end - end - - def test_delete_data_scan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_delete_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_scan({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_scan name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_scan ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_scan({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_scan(::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_scan_client_stub.call_count - end - end - end - - def test_get_data_scan - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataScan.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DATA_SCAN_VIEW_UNSPECIFIED - - get_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_get_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_scan({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_scan name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_scan ::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_scan({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_scan(::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_scan_client_stub.call_count - end - end - end - - def test_list_data_scans - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_scans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_list_data_scans_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_scans_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_scans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_scans ::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_scans(::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_scans_client_stub.call_count - end - end - end - - def test_run_data_scan - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - run_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_run_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_data_scan({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.run_data_scan name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.run_data_scan ::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.run_data_scan({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.run_data_scan(::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_data_scan_client_stub.call_count - end - end - end - - def test_get_data_scan_job - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataScanJob.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DATA_SCAN_JOB_VIEW_UNSPECIFIED - - get_data_scan_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_get_data_scan_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_scan_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_scan_job({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_scan_job name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_scan_job ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_scan_job({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_scan_job(::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_scan_job_client_stub.call_count - end - end - end - - def test_list_data_scan_jobs - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_data_scan_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_list_data_scan_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_scan_jobs_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_scan_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_scan_jobs ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_scan_jobs(::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_scan_jobs_client_stub.call_count - end - end - end - - def test_generate_data_quality_rules - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - generate_data_quality_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_generate_data_quality_rules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_data_quality_rules_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_data_quality_rules({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_data_quality_rules name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_data_quality_rules ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_data_quality_rules({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_data_quality_rules(::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_data_quality_rules_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb deleted file mode 100644 index 392ea73c89c1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb +++ /dev/null @@ -1,665 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/datascans_pb" -require "google/cloud/dataplex/v1/datascans_services_pb" -require "google/cloud/dataplex/v1/data_scan_service" - -class ::Google::Cloud::Dataplex::V1::DataScanService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_data_scan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_scan = {} - data_scan_id = "hello world" - validate_only = true - - create_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataScanRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataScan), request["data_scan"] - assert_equal "hello world", request["data_scan_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_scan parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_scan ::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_scan(::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_scan_client_stub.call_rpc_count - end - end - - def test_update_data_scan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - data_scan = {} - update_mask = {} - validate_only = true - - update_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataScan), request["data_scan"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_scan data_scan: data_scan, update_mask: update_mask, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_scan ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_scan(::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_scan_client_stub.call_rpc_count - end - end - - def test_delete_data_scan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_scan({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_scan name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_scan ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_scan({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_scan(::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_scan_client_stub.call_rpc_count - end - end - - def test_get_data_scan - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataScan.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DATA_SCAN_VIEW_UNSPECIFIED - - get_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataScanRequest, request - assert_equal "hello world", request["name"] - assert_equal :DATA_SCAN_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_scan({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_scan name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_scan ::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_scan({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_scan(::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_scan_client_stub.call_rpc_count - end - end - - def test_list_data_scans - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_scans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_scans, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataScansRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_scans_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_scans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_scans ::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_scans(::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_scans_client_stub.call_rpc_count - end - end - - def test_run_data_scan - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - run_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::RunDataScanRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_data_scan({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.run_data_scan name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.run_data_scan ::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.run_data_scan({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.run_data_scan(::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_data_scan_client_stub.call_rpc_count - end - end - - def test_get_data_scan_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataScanJob.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DATA_SCAN_JOB_VIEW_UNSPECIFIED - - get_data_scan_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_scan_job, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, request - assert_equal "hello world", request["name"] - assert_equal :DATA_SCAN_JOB_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_scan_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_scan_job({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_scan_job name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_scan_job ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_scan_job({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_scan_job(::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_scan_job_client_stub.call_rpc_count - end - end - - def test_list_data_scan_jobs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_data_scan_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_scan_jobs, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_scan_jobs_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_scan_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_scan_jobs ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_scan_jobs(::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_scan_jobs_client_stub.call_rpc_count - end - end - - def test_generate_data_quality_rules - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - generate_data_quality_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_data_quality_rules, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_data_quality_rules_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_data_quality_rules({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_data_quality_rules name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_data_quality_rules ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_data_quality_rules({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_data_quality_rules(::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_data_quality_rules_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration, config - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb deleted file mode 100644 index 7b371bd9a615..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb +++ /dev/null @@ -1,389 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/data_taxonomy_pb" -require "google/cloud/dataplex/v1/data_taxonomy_services_pb" -require "google/cloud/dataplex/v1/data_taxonomy_service" - -class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb deleted file mode 100644 index c0e783bf9bf9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/data_taxonomy_service" - -class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_data_attribute_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_attribute_path project: "value0", location: "value1", dataTaxonomy: "value2", data_attribute_id: "value3" - assert_equal "projects/value0/locations/value1/dataTaxonomies/value2/attributes/value3", path - end - end - - def test_data_attribute_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_attribute_binding_path project: "value0", location: "value1", data_attribute_binding_id: "value2" - assert_equal "projects/value0/locations/value1/dataAttributeBindings/value2", path - end - end - - def test_data_taxonomy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_taxonomy_path project: "value0", location: "value1", data_taxonomy_id: "value2" - assert_equal "projects/value0/locations/value1/dataTaxonomies/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb deleted file mode 100644 index d010c1dfc5c8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb +++ /dev/null @@ -1,931 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/dataplex/v1/data_taxonomy_pb" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest" - - -class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_data_taxonomy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_taxonomy_id = "hello world" - data_taxonomy = {} - validate_only = true - - create_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_taxonomy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_taxonomy parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_taxonomy ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_taxonomy(::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_taxonomy_client_stub.call_count - end - end - end - - def test_update_data_taxonomy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_taxonomy = {} - validate_only = true - - update_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_taxonomy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_taxonomy update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_taxonomy ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_taxonomy(::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_taxonomy_client_stub.call_count - end - end - end - - def test_delete_data_taxonomy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_taxonomy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_taxonomy({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_taxonomy name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_taxonomy ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_taxonomy({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_taxonomy(::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_taxonomy_client_stub.call_count - end - end - end - - def test_list_data_taxonomies - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_taxonomies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_taxonomies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_taxonomies_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_taxonomies parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_taxonomies ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_taxonomies(::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_taxonomies_client_stub.call_count - end - end - end - - def test_get_data_taxonomy - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataTaxonomy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_taxonomy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_taxonomy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_taxonomy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_taxonomy ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_taxonomy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_taxonomy(::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_taxonomy_client_stub.call_count - end - end - end - - def test_create_data_attribute_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_attribute_binding_id = "hello world" - data_attribute_binding = {} - validate_only = true - - create_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_attribute_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_attribute_binding parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_attribute_binding ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_attribute_binding(::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_attribute_binding_client_stub.call_count - end - end - end - - def test_update_data_attribute_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_attribute_binding = {} - validate_only = true - - update_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_attribute_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_attribute_binding update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_attribute_binding ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_attribute_binding(::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_attribute_binding_client_stub.call_count - end - end - end - - def test_delete_data_attribute_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_attribute_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_attribute_binding({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_attribute_binding name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_attribute_binding ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_attribute_binding({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_attribute_binding(::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_attribute_binding_client_stub.call_count - end - end - end - - def test_list_data_attribute_bindings - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_attribute_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_attribute_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_attribute_bindings_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_attribute_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_attribute_bindings ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_attribute_bindings(::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_attribute_bindings_client_stub.call_count - end - end - end - - def test_get_data_attribute_binding - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_attribute_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_attribute_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_attribute_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_attribute_binding ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_attribute_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_attribute_binding(::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_attribute_binding_client_stub.call_count - end - end - end - - def test_create_data_attribute - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_attribute_id = "hello world" - data_attribute = {} - validate_only = true - - create_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_attribute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_attribute parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_attribute ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_attribute(::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_attribute_client_stub.call_count - end - end - end - - def test_update_data_attribute - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_attribute = {} - validate_only = true - - update_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_attribute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_attribute update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_attribute ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_attribute(::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_attribute_client_stub.call_count - end - end - end - - def test_delete_data_attribute - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_attribute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_attribute({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_attribute name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_attribute ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_attribute({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_attribute(::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_attribute_client_stub.call_count - end - end - end - - def test_list_data_attributes - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_attributes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_attributes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_attributes_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_attributes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_attributes ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_attributes(::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_attributes_client_stub.call_count - end - end - end - - def test_get_data_attribute - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataAttribute.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_attribute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_attribute({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_attribute name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_attribute ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_attribute({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_attribute(::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_attribute_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb deleted file mode 100644 index 0a264bcd0072..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb +++ /dev/null @@ -1,1080 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/data_taxonomy_pb" -require "google/cloud/dataplex/v1/data_taxonomy_services_pb" -require "google/cloud/dataplex/v1/data_taxonomy_service" - -class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_data_taxonomy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_taxonomy_id = "hello world" - data_taxonomy = {} - validate_only = true - - create_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_taxonomy, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["data_taxonomy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataTaxonomy), request["data_taxonomy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_taxonomy parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_taxonomy ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_taxonomy(::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_taxonomy_client_stub.call_rpc_count - end - end - - def test_update_data_taxonomy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_taxonomy = {} - validate_only = true - - update_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_taxonomy, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataTaxonomy), request["data_taxonomy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_taxonomy update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_taxonomy ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_taxonomy(::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_taxonomy_client_stub.call_rpc_count - end - end - - def test_delete_data_taxonomy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_taxonomy, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_taxonomy({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_taxonomy name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_taxonomy ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_taxonomy({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_taxonomy(::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_taxonomy_client_stub.call_rpc_count - end - end - - def test_list_data_taxonomies - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_taxonomies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_taxonomies, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_taxonomies_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_taxonomies parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_taxonomies ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_taxonomies(::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_taxonomies_client_stub.call_rpc_count - end - end - - def test_get_data_taxonomy - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataTaxonomy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_taxonomy, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_taxonomy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_taxonomy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_taxonomy ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_taxonomy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_taxonomy(::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_taxonomy_client_stub.call_rpc_count - end - end - - def test_create_data_attribute_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_attribute_binding_id = "hello world" - data_attribute_binding = {} - validate_only = true - - create_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_attribute_binding, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["data_attribute_binding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttributeBinding), request["data_attribute_binding"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_attribute_binding parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_attribute_binding ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_attribute_binding(::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_attribute_binding_client_stub.call_rpc_count - end - end - - def test_update_data_attribute_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_attribute_binding = {} - validate_only = true - - update_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_attribute_binding, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttributeBinding), request["data_attribute_binding"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_attribute_binding update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_attribute_binding ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_attribute_binding(::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_attribute_binding_client_stub.call_rpc_count - end - end - - def test_delete_data_attribute_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_attribute_binding, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_attribute_binding({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_attribute_binding name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_attribute_binding ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_attribute_binding({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_attribute_binding(::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_attribute_binding_client_stub.call_rpc_count - end - end - - def test_list_data_attribute_bindings - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_attribute_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_attribute_bindings, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_attribute_bindings_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_attribute_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_attribute_bindings ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_attribute_bindings(::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_attribute_bindings_client_stub.call_rpc_count - end - end - - def test_get_data_attribute_binding - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_attribute_binding, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_attribute_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_attribute_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_attribute_binding ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_attribute_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_attribute_binding(::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_attribute_binding_client_stub.call_rpc_count - end - end - - def test_create_data_attribute - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_attribute_id = "hello world" - data_attribute = {} - validate_only = true - - create_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_attribute, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["data_attribute_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttribute), request["data_attribute"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_attribute parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_attribute ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_attribute(::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_attribute_client_stub.call_rpc_count - end - end - - def test_update_data_attribute - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_attribute = {} - validate_only = true - - update_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_attribute, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttribute), request["data_attribute"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_attribute update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_attribute ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_attribute(::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_attribute_client_stub.call_rpc_count - end - end - - def test_delete_data_attribute - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_attribute, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_attribute({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_attribute name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_attribute ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_attribute({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_attribute(::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_attribute_client_stub.call_rpc_count - end - end - - def test_list_data_attributes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_attributes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_attributes, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_attributes_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_attributes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_attributes ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_attributes(::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_attributes_client_stub.call_rpc_count - end - end - - def test_get_data_attribute - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataAttribute.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_attribute, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_attribute({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_attribute name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_attribute ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_attribute({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_attribute(::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_attribute_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration, config - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb deleted file mode 100644 index 99f73b424fa1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb +++ /dev/null @@ -1,389 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/service_pb" -require "google/cloud/dataplex/v1/service_services_pb" -require "google/cloud/dataplex/v1/dataplex_service" - -class ::Google::Cloud::Dataplex::V1::DataplexService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb deleted file mode 100644 index 24b850eb7d98..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb +++ /dev/null @@ -1,119 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/dataplex_service" - -class ::Google::Cloud::Dataplex::V1::DataplexService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_asset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.asset_path project: "value0", location: "value1", lake: "value2", zone: "value3", asset: "value4" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/assets/value4", path - end - end - - def test_environment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.environment_path project: "value0", location: "value1", lake: "value2", environment: "value3" - assert_equal "projects/value0/locations/value1/lakes/value2/environments/value3", path - end - end - - def test_job_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.job_path project: "value0", location: "value1", lake: "value2", task: "value3", job: "value4" - assert_equal "projects/value0/locations/value1/lakes/value2/tasks/value3/jobs/value4", path - end - end - - def test_lake_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lake_path project: "value0", location: "value1", lake: "value2" - assert_equal "projects/value0/locations/value1/lakes/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_task_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_path project: "value0", location: "value1", lake: "value2", task: "value3" - assert_equal "projects/value0/locations/value1/lakes/value2/tasks/value3", path - end - end - - def test_zone_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.zone_path project: "value0", location: "value1", lake: "value2", zone: "value3" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb deleted file mode 100644 index c4dee6bbd6ed..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb +++ /dev/null @@ -1,1931 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/dataplex/v1/service_pb" -require "google/cloud/dataplex/v1/dataplex_service/rest" - - -class ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_lake - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lake_id = "hello world" - lake = {} - validate_only = true - - create_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_lake_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_lake parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_lake ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_lake(::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_lake_client_stub.call_count - end - end - end - - def test_update_lake - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - lake = {} - validate_only = true - - update_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_lake_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_lake update_mask: update_mask, lake: lake, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_lake ::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_lake(::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_lake_client_stub.call_count - end - end - end - - def test_delete_lake - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_lake_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_lake({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_lake name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_lake ::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_lake({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_lake(::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_lake_client_stub.call_count - end - end - end - - def test_list_lakes - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListLakesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_lakes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_lakes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lakes_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_lakes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_lakes ::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_lakes(::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_lakes_client_stub.call_count - end - end - end - - def test_get_lake - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Lake.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_lake_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_lake({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_lake name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_lake ::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_lake({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_lake(::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lake_client_stub.call_count - end - end - end - - def test_list_lake_actions - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_lake_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_lake_actions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lake_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_lake_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_lake_actions ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_lake_actions(::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_lake_actions_client_stub.call_count - end - end - end - - def test_create_zone - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - zone_id = "hello world" - zone = {} - validate_only = true - - create_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_zone parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_zone ::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_zone(::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_zone_client_stub.call_count - end - end - end - - def test_update_zone - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - zone = {} - validate_only = true - - update_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_zone update_mask: update_mask, zone: zone, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_zone ::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_zone(::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_zone_client_stub.call_count - end - end - end - - def test_delete_zone - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_zone({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_zone name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_zone ::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_zone({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_zone(::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_zone_client_stub.call_count - end - end - end - - def test_list_zones - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListZonesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_zones_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_zones_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_zones_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_zones parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_zones ::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_zones(::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_zones_client_stub.call_count - end - end - end - - def test_get_zone - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Zone.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_zone({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_zone name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_zone ::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_zone({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_zone(::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_zone_client_stub.call_count - end - end - end - - def test_list_zone_actions - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_zone_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_zone_actions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_zone_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_zone_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_zone_actions ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_zone_actions(::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_zone_actions_client_stub.call_count - end - end - end - - def test_create_asset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - asset_id = "hello world" - asset = {} - validate_only = true - - create_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_asset parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_asset ::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_asset(::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_asset_client_stub.call_count - end - end - end - - def test_update_asset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - asset = {} - validate_only = true - - update_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_asset update_mask: update_mask, asset: asset, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_asset ::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_asset(::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_asset_client_stub.call_count - end - end - end - - def test_delete_asset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_asset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_asset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_asset ::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_asset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_asset(::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_asset_client_stub.call_count - end - end - end - - def test_list_assets - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_assets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_assets ::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_assets(::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_count - end - end - end - - def test_get_asset - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Asset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_asset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_asset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_asset ::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_asset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_asset(::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_asset_client_stub.call_count - end - end - end - - def test_list_asset_actions - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_asset_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_asset_actions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_asset_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_asset_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_asset_actions ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_asset_actions(::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_asset_actions_client_stub.call_count - end - end - end - - def test_create_task - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - task_id = "hello world" - task = {} - validate_only = true - - create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_task parent: parent, task_id: task_id, task: task, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_task ::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_task(::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_count - end - end - end - - def test_update_task - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - task = {} - validate_only = true - - update_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_task update_mask: update_mask, task: task, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_task ::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_task(::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_task_client_stub.call_count - end - end - end - - def test_delete_task - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_task({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_task name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_task ::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_task({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_task(::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_task_client_stub.call_count - end - end - end - - def test_list_tasks - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListTasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_tasks parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_tasks ::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_tasks(::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_tasks_client_stub.call_count - end - end - end - - def test_get_task - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_task({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_task name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_task ::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_task({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_task(::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_count - end - end - end - - def test_list_jobs - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListJobsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_jobs_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_jobs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_jobs ::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_jobs(::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_jobs_client_stub.call_count - end - end - end - - def test_run_task - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::RunTaskResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - labels = {} - args = {} - - run_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_run_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_task({ name: name, labels: labels, args: args }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.run_task name: name, labels: labels, args: args do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.run_task ::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.run_task({ name: name, labels: labels, args: args }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.run_task(::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_task_client_stub.call_count - end - end - end - - def test_get_job - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Job.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_job ::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_job(::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_job_client_stub.call_count - end - end - end - - def test_cancel_job - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_cancel_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, cancel_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.cancel_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.cancel_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.cancel_job ::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.cancel_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.cancel_job(::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, cancel_job_client_stub.call_count - end - end - end - - def test_create_environment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - environment_id = "hello world" - environment = {} - validate_only = true - - create_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_environment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_environment parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_environment ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_environment(::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_environment_client_stub.call_count - end - end - end - - def test_update_environment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - environment = {} - validate_only = true - - update_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_environment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_environment update_mask: update_mask, environment: environment, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_environment ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_environment(::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_environment_client_stub.call_count - end - end - end - - def test_delete_environment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_environment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_environment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_environment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_environment ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_environment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_environment(::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_environment_client_stub.call_count - end - end - end - - def test_list_environments - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_environments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_environments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_environments_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_environments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_environments ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_environments(::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_environments_client_stub.call_count - end - end - end - - def test_get_environment - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Environment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_environment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_environment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_environment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_environment ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_environment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_environment(::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_environment_client_stub.call_count - end - end - end - - def test_list_sessions - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListSessionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_sessions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_sessions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_sessions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_sessions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_sessions ::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_sessions(::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_sessions_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb deleted file mode 100644 index 7c667d2e90a4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb +++ /dev/null @@ -1,2245 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/service_pb" -require "google/cloud/dataplex/v1/service_services_pb" -require "google/cloud/dataplex/v1/dataplex_service" - -class ::Google::Cloud::Dataplex::V1::DataplexService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_lake - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lake_id = "hello world" - lake = {} - validate_only = true - - create_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_lake, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateLakeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["lake_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Lake), request["lake"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_lake parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_lake ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_lake(::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_lake_client_stub.call_rpc_count - end - end - - def test_update_lake - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - lake = {} - validate_only = true - - update_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_lake, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateLakeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Lake), request["lake"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_lake update_mask: update_mask, lake: lake, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_lake ::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_lake(::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_lake_client_stub.call_rpc_count - end - end - - def test_delete_lake - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_lake, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteLakeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_lake({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_lake name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_lake ::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_lake({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_lake(::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_lake_client_stub.call_rpc_count - end - end - - def test_list_lakes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListLakesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_lakes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lakes, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListLakesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_lakes_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_lakes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_lakes ::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_lakes(::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_lakes_client_stub.call_rpc_count - end - end - - def test_get_lake - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Lake.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lake, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetLakeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_lake({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_lake name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_lake ::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_lake({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_lake(::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_lake_client_stub.call_rpc_count - end - end - - def test_list_lake_actions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_lake_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lake_actions, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_lake_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_lake_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_lake_actions ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_lake_actions(::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_lake_actions_client_stub.call_rpc_count - end - end - - def test_create_zone - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - zone_id = "hello world" - zone = {} - validate_only = true - - create_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_zone, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateZoneRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["zone_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Zone), request["zone"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_zone parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_zone ::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_zone(::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_zone_client_stub.call_rpc_count - end - end - - def test_update_zone - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - zone = {} - validate_only = true - - update_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_zone, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateZoneRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Zone), request["zone"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_zone update_mask: update_mask, zone: zone, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_zone ::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_zone(::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_zone_client_stub.call_rpc_count - end - end - - def test_delete_zone - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_zone, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteZoneRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_zone({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_zone name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_zone ::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_zone({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_zone(::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_zone_client_stub.call_rpc_count - end - end - - def test_list_zones - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListZonesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_zones_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_zones, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListZonesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_zones_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_zones parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_zones ::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_zones(::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_zones_client_stub.call_rpc_count - end - end - - def test_get_zone - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Zone.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_zone, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetZoneRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_zone({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_zone name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_zone ::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_zone({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_zone(::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_zone_client_stub.call_rpc_count - end - end - - def test_list_zone_actions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_zone_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_zone_actions, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_zone_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_zone_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_zone_actions ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_zone_actions(::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_zone_actions_client_stub.call_rpc_count - end - end - - def test_create_asset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - asset_id = "hello world" - asset = {} - validate_only = true - - create_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_asset, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateAssetRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["asset_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Asset), request["asset"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_asset parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_asset ::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_asset(::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_asset_client_stub.call_rpc_count - end - end - - def test_update_asset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - asset = {} - validate_only = true - - update_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_asset, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateAssetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Asset), request["asset"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_asset update_mask: update_mask, asset: asset, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_asset ::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_asset(::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_asset_client_stub.call_rpc_count - end - end - - def test_delete_asset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_asset, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteAssetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_asset({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_asset name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_asset ::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_asset({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_asset(::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_asset_client_stub.call_rpc_count - end - end - - def test_list_assets - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_assets, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListAssetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_assets_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_assets ::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_assets(::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_rpc_count - end - end - - def test_get_asset - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Asset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_asset, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetAssetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_asset({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_asset name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_asset ::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_asset({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_asset(::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_asset_client_stub.call_rpc_count - end - end - - def test_list_asset_actions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_asset_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_asset_actions, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_asset_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_asset_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_asset_actions ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_asset_actions(::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_asset_actions_client_stub.call_rpc_count - end - end - - def test_create_task - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - task_id = "hello world" - task = {} - validate_only = true - - create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateTaskRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["task_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Task), request["task"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_task parent: parent, task_id: task_id, task: task, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_task ::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_task(::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_rpc_count - end - end - - def test_update_task - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - task = {} - validate_only = true - - update_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Task), request["task"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_task update_mask: update_mask, task: task, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_task ::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_task(::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_task_client_stub.call_rpc_count - end - end - - def test_delete_task - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteTaskRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_task({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_task name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_task ::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_task({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_task(::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_task_client_stub.call_rpc_count - end - end - - def test_list_tasks - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tasks, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListTasksRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_tasks parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_tasks ::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_tasks(::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_tasks_client_stub.call_rpc_count - end - end - - def test_get_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetTaskRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_task({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_task name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_task ::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_task({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_task(::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_rpc_count - end - end - - def test_list_jobs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListJobsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_jobs, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListJobsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_jobs_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_jobs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_jobs ::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_jobs(::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_jobs_client_stub.call_rpc_count - end - end - - def test_run_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::RunTaskResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - labels = {} - args = {} - - run_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::RunTaskRequest, request - assert_equal "hello world", request["name"] - assert_equal({}, request["labels"].to_h) - assert_equal({}, request["args"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_task({ name: name, labels: labels, args: args }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.run_task name: name, labels: labels, args: args do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.run_task ::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.run_task({ name: name, labels: labels, args: args }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.run_task(::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_task_client_stub.call_rpc_count - end - end - - def test_get_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Job.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_job, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_job ::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_job(::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_job_client_stub.call_rpc_count - end - end - - def test_cancel_job - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_job, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CancelJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_job ::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_job(::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_job_client_stub.call_rpc_count - end - end - - def test_create_environment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - environment_id = "hello world" - environment = {} - validate_only = true - - create_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_environment, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["environment_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Environment), request["environment"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_environment parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_environment ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_environment(::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_environment_client_stub.call_rpc_count - end - end - - def test_update_environment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - environment = {} - validate_only = true - - update_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_environment, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Environment), request["environment"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_environment update_mask: update_mask, environment: environment, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_environment ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_environment(::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_environment_client_stub.call_rpc_count - end - end - - def test_delete_environment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_environment, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_environment({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_environment name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_environment ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_environment({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_environment(::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_environment_client_stub.call_rpc_count - end - end - - def test_list_environments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_environments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_environments, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_environments_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_environments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_environments ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_environments(::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_environments_client_stub.call_rpc_count - end - end - - def test_get_environment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Environment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_environment, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_environment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_environment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_environment ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_environment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_environment(::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_environment_client_stub.call_rpc_count - end - end - - def test_list_sessions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListSessionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_sessions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sessions, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListSessionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_sessions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_sessions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_sessions ::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_sessions(::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_sessions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration, config - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb deleted file mode 100644 index 6d103094c6ef..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/metadata_service" - -class ::Google::Cloud::Dataplex::V1::MetadataService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_entity_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entity_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4", path - end - end - - def test_partition_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.partition_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4", partition: "value5" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4/partitions/value5", path - end - end - - def test_zone_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.zone_path project: "value0", location: "value1", lake: "value2", zone: "value3" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb deleted file mode 100644 index f39b65a77194..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb +++ /dev/null @@ -1,592 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/dataplex/v1/metadata_pb" -require "google/cloud/dataplex/v1/metadata_service/rest" - - -class ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_entity - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entity = {} - validate_only = true - - create_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_create_entity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_entity parent: parent, entity: entity, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_entity ::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_entity(::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_entity_client_stub.call_count - end - end - end - - def test_update_entity - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - entity = {} - validate_only = true - - update_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_update_entity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_entity({ entity: entity, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_entity entity: entity, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_entity ::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_entity({ entity: entity, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_entity(::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_entity_client_stub.call_count - end - end - end - - def test_delete_entity - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_delete_entity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_entity({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_entity name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_entity ::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_entity({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_entity(::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_entity_client_stub.call_count - end - end - end - - def test_get_entity - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTITY_VIEW_UNSPECIFIED - - get_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_get_entity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_entity({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_entity name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_entity ::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_entity({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_entity(::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_entity_client_stub.call_count - end - end - end - - def test_list_entities - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - view = :ENTITY_VIEW_UNSPECIFIED - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_entities_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_list_entities_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_entities_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_entities parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_entities ::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_entities(::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_entities_client_stub.call_count - end - end - end - - def test_create_partition - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Partition.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - partition = {} - validate_only = true - - create_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_create_partition_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_partition parent: parent, partition: partition, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_partition ::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_partition(::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_partition_client_stub.call_count - end - end - end - - def test_delete_partition - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_delete_partition_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_partition({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_partition name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_partition ::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_partition({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_partition(::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_partition_client_stub.call_count - end - end - end - - def test_get_partition - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Partition.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_get_partition_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_partition({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_partition name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_partition ::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_partition({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_partition(::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_partition_client_stub.call_count - end - end - end - - def test_list_partitions - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_partitions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_list_partitions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_partitions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_partitions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_partitions ::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_partitions(::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_partitions_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb deleted file mode 100644 index 7a3016ddfe7f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb +++ /dev/null @@ -1,638 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/metadata_pb" -require "google/cloud/dataplex/v1/metadata_services_pb" -require "google/cloud/dataplex/v1/metadata_service" - -class ::Google::Cloud::Dataplex::V1::MetadataService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_entity - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entity = {} - validate_only = true - - create_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_entity, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntityRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entity), request["entity"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_entity parent: parent, entity: entity, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_entity ::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_entity(::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_entity_client_stub.call_rpc_count - end - end - - def test_update_entity - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - entity = {} - validate_only = true - - update_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_entity, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntityRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entity), request["entity"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_entity({ entity: entity, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_entity entity: entity, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_entity ::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_entity({ entity: entity, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_entity(::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_entity_client_stub.call_rpc_count - end - end - - def test_delete_entity - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_entity, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntityRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_entity({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_entity name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_entity ::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_entity({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_entity(::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_entity_client_stub.call_rpc_count - end - end - - def test_get_entity - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTITY_VIEW_UNSPECIFIED - - get_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_entity, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntityRequest, request - assert_equal "hello world", request["name"] - assert_equal :ENTITY_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_entity({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_entity name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_entity ::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_entity({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_entity(::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_entity_client_stub.call_rpc_count - end - end - - def test_list_entities - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - view = :ENTITY_VIEW_UNSPECIFIED - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_entities_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_entities, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntitiesRequest, request - assert_equal "hello world", request["parent"] - assert_equal :ENTITY_VIEW_UNSPECIFIED, request["view"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_entities_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_entities parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_entities ::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_entities(::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_entities_client_stub.call_rpc_count - end - end - - def test_create_partition - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Partition.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - partition = {} - validate_only = true - - create_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_partition, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreatePartitionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Partition), request["partition"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_partition parent: parent, partition: partition, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_partition ::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_partition(::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_partition_client_stub.call_rpc_count - end - end - - def test_delete_partition - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_partition, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeletePartitionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_partition({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_partition name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_partition ::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_partition({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_partition(::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_partition_client_stub.call_rpc_count - end - end - - def test_get_partition - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Partition.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_partition, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetPartitionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_partition({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_partition name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_partition ::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_partition({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_partition(::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_partition_client_stub.call_rpc_count - end - end - - def test_list_partitions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_partitions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_partitions, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListPartitionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_partitions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_partitions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_partitions ::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_partitions(::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_partitions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::MetadataService::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb deleted file mode 100644 index 48407bca7edb..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" From 388ae065d1696a0a3a57ef247cd71bea2522bffd Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 8 May 2024 00:03:32 +0000 Subject: [PATCH 3/4] chore: update copyright year for auto-generated protos PiperOrigin-RevId: 631538781 Source-Link: https://github.com/googleapis/googleapis/commit/3597f7db2191c00b100400991ef96e52d62f5841 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8021fdf8d66f6005519c044d5834124b677dc919 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFwbGV4LXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MDIxZmRmOGQ2NmY2MDA1NTE5YzA0NGQ1ODM0MTI0YjY3N2RjOTE5In0= --- .../google-cloud-dataplex-v1/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-dataplex-v1/.rubocop.yml | 33 + .../google-cloud-dataplex-v1/.toys.rb | 28 + .../google-cloud-dataplex-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-dataplex-v1/CHANGELOG.md | 2 + .../google-cloud-dataplex-v1/Gemfile | 11 + .../google-cloud-dataplex-v1/LICENSE.md | 201 + .../google-cloud-dataplex-v1/README.md | 144 + .../google-cloud-dataplex-v1/Rakefile | 169 + .../gapic_metadata.json | 543 +++ .../google-cloud-dataplex-v1.gemspec | 30 + .../lib/google-cloud-dataplex-v1.rb | 21 + .../lib/google/cloud/dataplex/v1.rb | 50 + .../google/cloud/dataplex/v1/analyze_pb.rb | 62 + .../cloud/dataplex/v1/bindings_override.rb | 423 ++ .../google/cloud/dataplex/v1/catalog_pb.rb | 101 + .../cloud/dataplex/v1/catalog_service.rb | 60 + .../dataplex/v1/catalog_service/client.rb | 2797 ++++++++++++ .../v1/catalog_service/credentials.rb | 47 + .../dataplex/v1/catalog_service/operations.rb | 801 ++++ .../dataplex/v1/catalog_service/paths.rb | 128 + .../cloud/dataplex/v1/catalog_service/rest.rb | 58 + .../v1/catalog_service/rest/client.rb | 2622 +++++++++++ .../v1/catalog_service/rest/operations.rb | 895 ++++ .../v1/catalog_service/rest/service_stub.rb | 1375 ++++++ .../cloud/dataplex/v1/catalog_services_pb.rb | 91 + .../google/cloud/dataplex/v1/content_pb.rb | 60 + .../cloud/dataplex/v1/content_service.rb | 55 + .../dataplex/v1/content_service/client.rb | 1204 +++++ .../v1/content_service/credentials.rb | 47 + .../dataplex/v1/content_service/paths.rb | 73 + .../cloud/dataplex/v1/content_service/rest.rb | 53 + .../v1/content_service/rest/client.rb | 1131 +++++ .../v1/content_service/rest/service_stub.rb | 605 +++ .../cloud/dataplex/v1/content_services_pb.rb | 77 + .../cloud/dataplex/v1/data_profile_pb.rb | 60 + .../cloud/dataplex/v1/data_quality_pb.rb | 73 + .../cloud/dataplex/v1/data_scan_service.rb | 58 + .../dataplex/v1/data_scan_service/client.rb | 1329 ++++++ .../v1/data_scan_service/credentials.rb | 47 + .../v1/data_scan_service/operations.rb | 801 ++++ .../dataplex/v1/data_scan_service/paths.rb | 113 + .../dataplex/v1/data_scan_service/rest.rb | 56 + .../v1/data_scan_service/rest/client.rb | 1248 ++++++ .../v1/data_scan_service/rest/operations.rb | 895 ++++ .../v1/data_scan_service/rest/service_stub.rb | 612 +++ .../cloud/dataplex/v1/data_taxonomy_pb.rb | 77 + .../dataplex/v1/data_taxonomy_service.rb | 57 + .../v1/data_taxonomy_service/client.rb | 1966 ++++++++ .../v1/data_taxonomy_service/credentials.rb | 47 + .../v1/data_taxonomy_service/operations.rb | 801 ++++ .../v1/data_taxonomy_service/paths.rb | 109 + .../dataplex/v1/data_taxonomy_service/rest.rb | 55 + .../v1/data_taxonomy_service/rest/client.rb | 1841 ++++++++ .../data_taxonomy_service/rest/operations.rb | 895 ++++ .../rest/service_stub.rb | 960 ++++ .../dataplex/v1/data_taxonomy_services_pb.rb | 77 + .../cloud/dataplex/v1/dataplex_service.rb | 60 + .../dataplex/v1/dataplex_service/client.rb | 3950 +++++++++++++++++ .../v1/dataplex_service/credentials.rb | 47 + .../v1/dataplex_service/operations.rb | 801 ++++ .../dataplex/v1/dataplex_service/paths.rb | 178 + .../dataplex/v1/dataplex_service/rest.rb | 58 + .../v1/dataplex_service/rest/client.rb | 3700 +++++++++++++++ .../v1/dataplex_service/rest/operations.rb | 895 ++++ .../v1/dataplex_service/rest/service_stub.rb | 2028 +++++++++ .../google/cloud/dataplex/v1/datascans_pb.rb | 81 + .../dataplex/v1/datascans_services_pb.rb | 63 + .../lib/google/cloud/dataplex/v1/logs_pb.rb | 84 + .../google/cloud/dataplex/v1/metadata_pb.rb | 82 + .../cloud/dataplex/v1/metadata_service.rb | 56 + .../dataplex/v1/metadata_service/client.rb | 1313 ++++++ .../v1/metadata_service/credentials.rb | 47 + .../dataplex/v1/metadata_service/paths.rb | 102 + .../dataplex/v1/metadata_service/rest.rb | 54 + .../v1/metadata_service/rest/client.rb | 1233 +++++ .../v1/metadata_service/rest/service_stub.rb | 603 +++ .../cloud/dataplex/v1/metadata_services_pb.rb | 62 + .../google/cloud/dataplex/v1/processing_pb.rb | 50 + .../google/cloud/dataplex/v1/resources_pb.rb | 87 + .../lib/google/cloud/dataplex/v1/rest.rb | 43 + .../google/cloud/dataplex/v1/security_pb.rb | 45 + .../google/cloud/dataplex/v1/service_pb.rb | 101 + .../cloud/dataplex/v1/service_services_pb.rb | 117 + .../lib/google/cloud/dataplex/v1/tasks_pb.rb | 64 + .../lib/google/cloud/dataplex/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 399 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 222 + .../google/cloud/dataplex/v1/analyze.rb | 290 ++ .../google/cloud/dataplex/v1/catalog.rb | 1092 +++++ .../google/cloud/dataplex/v1/content.rb | 142 + .../google/cloud/dataplex/v1/data_profile.rb | 321 ++ .../google/cloud/dataplex/v1/data_quality.rb | 540 +++ .../google/cloud/dataplex/v1/data_taxonomy.rb | 565 +++ .../google/cloud/dataplex/v1/datascans.rb | 474 ++ .../google/cloud/dataplex/v1/logs.rb | 814 ++++ .../google/cloud/dataplex/v1/metadata.rb | 733 +++ .../google/cloud/dataplex/v1/processing.rb | 106 + .../google/cloud/dataplex/v1/resources.rb | 838 ++++ .../google/cloud/dataplex/v1/security.rb | 61 + .../google/cloud/dataplex/v1/service.rb | 803 ++++ .../google/cloud/dataplex/v1/tasks.rb | 435 ++ .../google/longrunning/operations.rb | 164 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/struct.rb | 96 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../google-cloud-dataplex-v1/snippets/Gemfile | 32 + .../catalog_service/create_aspect_type.rb | 54 + .../snippets/catalog_service/create_entry.rb | 47 + .../catalog_service/create_entry_group.rb | 54 + .../catalog_service/create_entry_type.rb | 54 + .../catalog_service/delete_aspect_type.rb | 54 + .../snippets/catalog_service/delete_entry.rb | 47 + .../catalog_service/delete_entry_group.rb | 54 + .../catalog_service/delete_entry_type.rb | 54 + .../catalog_service/get_aspect_type.rb | 47 + .../snippets/catalog_service/get_entry.rb | 47 + .../catalog_service/get_entry_group.rb | 47 + .../catalog_service/get_entry_type.rb | 47 + .../catalog_service/list_aspect_types.rb | 51 + .../snippets/catalog_service/list_entries.rb | 51 + .../catalog_service/list_entry_groups.rb | 51 + .../catalog_service/list_entry_types.rb | 51 + .../snippets/catalog_service/lookup_entry.rb | 47 + .../catalog_service/search_entries.rb | 51 + .../catalog_service/update_aspect_type.rb | 54 + .../snippets/catalog_service/update_entry.rb | 47 + .../catalog_service/update_entry_group.rb | 54 + .../catalog_service/update_entry_type.rb | 54 + .../content_service/create_content.rb | 47 + .../content_service/delete_content.rb | 47 + .../snippets/content_service/get_content.rb | 47 + .../content_service/get_iam_policy.rb | 47 + .../snippets/content_service/list_content.rb | 51 + .../content_service/set_iam_policy.rb | 47 + .../content_service/test_iam_permissions.rb | 47 + .../content_service/update_content.rb | 47 + .../data_scan_service/create_data_scan.rb | 54 + .../data_scan_service/delete_data_scan.rb | 54 + .../generate_data_quality_rules.rb | 47 + .../data_scan_service/get_data_scan.rb | 47 + .../data_scan_service/get_data_scan_job.rb | 47 + .../data_scan_service/list_data_scan_jobs.rb | 51 + .../data_scan_service/list_data_scans.rb | 51 + .../data_scan_service/run_data_scan.rb | 47 + .../data_scan_service/update_data_scan.rb | 54 + .../create_data_attribute.rb | 54 + .../create_data_attribute_binding.rb | 54 + .../create_data_taxonomy.rb | 54 + .../delete_data_attribute.rb | 54 + .../delete_data_attribute_binding.rb | 54 + .../delete_data_taxonomy.rb | 54 + .../get_data_attribute.rb | 47 + .../get_data_attribute_binding.rb | 47 + .../get_data_taxonomy.rb | 47 + .../list_data_attribute_bindings.rb | 51 + .../list_data_attributes.rb | 51 + .../list_data_taxonomies.rb | 51 + .../update_data_attribute.rb | 54 + .../update_data_attribute_binding.rb | 54 + .../update_data_taxonomy.rb | 54 + .../snippets/dataplex_service/cancel_job.rb | 47 + .../snippets/dataplex_service/create_asset.rb | 54 + .../dataplex_service/create_environment.rb | 54 + .../snippets/dataplex_service/create_lake.rb | 54 + .../snippets/dataplex_service/create_task.rb | 54 + .../snippets/dataplex_service/create_zone.rb | 54 + .../snippets/dataplex_service/delete_asset.rb | 54 + .../dataplex_service/delete_environment.rb | 54 + .../snippets/dataplex_service/delete_lake.rb | 54 + .../snippets/dataplex_service/delete_task.rb | 54 + .../snippets/dataplex_service/delete_zone.rb | 54 + .../snippets/dataplex_service/get_asset.rb | 47 + .../dataplex_service/get_environment.rb | 47 + .../snippets/dataplex_service/get_job.rb | 47 + .../snippets/dataplex_service/get_lake.rb | 47 + .../snippets/dataplex_service/get_task.rb | 47 + .../snippets/dataplex_service/get_zone.rb | 47 + .../dataplex_service/list_asset_actions.rb | 51 + .../snippets/dataplex_service/list_assets.rb | 51 + .../dataplex_service/list_environments.rb | 51 + .../snippets/dataplex_service/list_jobs.rb | 51 + .../dataplex_service/list_lake_actions.rb | 51 + .../snippets/dataplex_service/list_lakes.rb | 51 + .../dataplex_service/list_sessions.rb | 51 + .../snippets/dataplex_service/list_tasks.rb | 51 + .../dataplex_service/list_zone_actions.rb | 51 + .../snippets/dataplex_service/list_zones.rb | 51 + .../snippets/dataplex_service/run_task.rb | 47 + .../snippets/dataplex_service/update_asset.rb | 54 + .../dataplex_service/update_environment.rb | 54 + .../snippets/dataplex_service/update_lake.rb | 54 + .../snippets/dataplex_service/update_task.rb | 54 + .../snippets/dataplex_service/update_zone.rb | 54 + .../metadata_service/create_entity.rb | 47 + .../metadata_service/create_partition.rb | 47 + .../metadata_service/delete_entity.rb | 47 + .../metadata_service/delete_partition.rb | 47 + .../snippets/metadata_service/get_entity.rb | 47 + .../metadata_service/get_partition.rb | 47 + .../metadata_service/list_entities.rb | 51 + .../metadata_service/list_partitions.rb | 51 + .../metadata_service/update_entity.rb | 47 + ...pet_metadata_google.cloud.dataplex.v1.json | 3855 ++++++++++++++++ .../v1/catalog_service_operations_test.rb | 389 ++ .../dataplex/v1/catalog_service_paths_test.rb | 95 + .../dataplex/v1/catalog_service_rest_test.rb | 1330 ++++++ .../cloud/dataplex/v1/catalog_service_test.rb | 1538 +++++++ .../dataplex/v1/content_service_paths_test.rb | 59 + .../dataplex/v1/content_service_rest_test.rb | 535 +++ .../cloud/dataplex/v1/content_service_test.rb | 569 +++ .../v1/data_scan_service_operations_test.rb | 389 ++ .../v1/data_scan_service_paths_test.rb | 83 + .../v1/data_scan_service_rest_test.rb | 591 +++ .../dataplex/v1/data_scan_service_test.rb | 665 +++ .../data_taxonomy_service_operations_test.rb | 389 ++ .../v1/data_taxonomy_service_paths_test.rb | 83 + .../v1/data_taxonomy_service_rest_test.rb | 931 ++++ .../dataplex/v1/data_taxonomy_service_test.rb | 1080 +++++ .../v1/dataplex_service_operations_test.rb | 389 ++ .../v1/dataplex_service_paths_test.rb | 119 + .../dataplex/v1/dataplex_service_rest_test.rb | 1931 ++++++++ .../dataplex/v1/dataplex_service_test.rb | 2245 ++++++++++ .../v1/metadata_service_paths_test.rb | 71 + .../dataplex/v1/metadata_service_rest_test.rb | 592 +++ .../dataplex/v1/metadata_service_test.rb | 638 +++ .../google-cloud-dataplex-v1/test/helper.rb | 25 + 237 files changed, 74869 insertions(+) create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/README.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb 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 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json new file mode 100644 index 000000000000..70ddbcadde04 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "dataplex.googleapis.com", + "api_shortname": "dataplex", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-dataplex-v1/latest", + "distribution_name": "google-cloud-dataplex-v1", + "is_cloud": true, + "language": "ruby", + "name": "dataplex", + "name_pretty": "Dataplex V1 API", + "product_documentation": "https://cloud.google.com/dataplex/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. Note that google-cloud-dataplex-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dataplex instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/dataplex/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml b/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml new file mode 100644 index 000000000000..029e6a990334 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-dataplex-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-dataplex-v1.rb" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb b/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.yardopts b/owl-bot-staging/google-cloud-dataplex-v1/.yardopts new file mode 100644 index 000000000000..610ce5201635 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Dataplex V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..1c60fe75f8a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-dataplex-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-dataplex-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/dataplex/v1" + +client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/dataplex/v1" + +::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-dataplex-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/dataplex/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-dataplex-v1/Gemfile b/owl-bot-staging/google-cloud-dataplex-v1/Gemfile new file mode 100644 index 000000000000..95163a6d11f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md b/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/README.md b/owl-bot-staging/google-cloud-dataplex-v1/README.md new file mode 100644 index 000000000000..9ad26827a2d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/README.md @@ -0,0 +1,144 @@ +# Ruby Client for the Dataplex V1 API + +Dataplex API is used to manage the lifecycle of data lakes. + +Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Dataplex V1 API. Most users should consider using +the main client gem, +[google-cloud-dataplex](https://rubygems.org/gems/google-cloud-dataplex). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-dataplex-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/dataplex.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/dataplex/v1" + +client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new +request = ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new # (request fields as keyword arguments...) +response = client.create_lake request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-dataplex-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/dataplex/) +for general usage information. + +## Enabling Logging + +To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. +The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, +or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) +that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) +and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. + +Configuring a Ruby stdlib logger: + +```ruby +require "logger" + +module MyLogger + LOGGER = Logger.new $stderr, level: Logger::WARN + def logger + LOGGER + end +end + +# Define a gRPC module-level logger method before grpc/logconfig.rb loads. +module GRPC + extend MyLogger +end +``` + + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 2.7+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-dataplex`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-dataplex-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-dataplex`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-dataplex-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/Rakefile b/owl-bot-staging/google-cloud-dataplex-v1/Rakefile new file mode 100644 index 000000000000..7de3c4e2f174 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-dataplex-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/dataplex/v1/dataplex_service/credentials" + ::Google::Cloud::Dataplex::V1::DataplexService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-dataplex-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-dataplex-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-dataplex-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-dataplex-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-dataplex-v1" + header "google-cloud-dataplex-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-dataplex-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-dataplex-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-dataplex-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-dataplex-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json new file mode 100644 index 000000000000..99bf76d4e7ae --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json @@ -0,0 +1,543 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.dataplex.v1", + "libraryPackage": "::Google::Cloud::Dataplex::V1", + "services": { + "DataplexService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::DataplexService::Client", + "rpcs": { + "CreateLake": { + "methods": [ + "create_lake" + ] + }, + "UpdateLake": { + "methods": [ + "update_lake" + ] + }, + "DeleteLake": { + "methods": [ + "delete_lake" + ] + }, + "ListLakes": { + "methods": [ + "list_lakes" + ] + }, + "GetLake": { + "methods": [ + "get_lake" + ] + }, + "ListLakeActions": { + "methods": [ + "list_lake_actions" + ] + }, + "CreateZone": { + "methods": [ + "create_zone" + ] + }, + "UpdateZone": { + "methods": [ + "update_zone" + ] + }, + "DeleteZone": { + "methods": [ + "delete_zone" + ] + }, + "ListZones": { + "methods": [ + "list_zones" + ] + }, + "GetZone": { + "methods": [ + "get_zone" + ] + }, + "ListZoneActions": { + "methods": [ + "list_zone_actions" + ] + }, + "CreateAsset": { + "methods": [ + "create_asset" + ] + }, + "UpdateAsset": { + "methods": [ + "update_asset" + ] + }, + "DeleteAsset": { + "methods": [ + "delete_asset" + ] + }, + "ListAssets": { + "methods": [ + "list_assets" + ] + }, + "GetAsset": { + "methods": [ + "get_asset" + ] + }, + "ListAssetActions": { + "methods": [ + "list_asset_actions" + ] + }, + "CreateTask": { + "methods": [ + "create_task" + ] + }, + "UpdateTask": { + "methods": [ + "update_task" + ] + }, + "DeleteTask": { + "methods": [ + "delete_task" + ] + }, + "ListTasks": { + "methods": [ + "list_tasks" + ] + }, + "GetTask": { + "methods": [ + "get_task" + ] + }, + "ListJobs": { + "methods": [ + "list_jobs" + ] + }, + "RunTask": { + "methods": [ + "run_task" + ] + }, + "GetJob": { + "methods": [ + "get_job" + ] + }, + "CancelJob": { + "methods": [ + "cancel_job" + ] + }, + "CreateEnvironment": { + "methods": [ + "create_environment" + ] + }, + "UpdateEnvironment": { + "methods": [ + "update_environment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "delete_environment" + ] + }, + "ListEnvironments": { + "methods": [ + "list_environments" + ] + }, + "GetEnvironment": { + "methods": [ + "get_environment" + ] + }, + "ListSessions": { + "methods": [ + "list_sessions" + ] + } + } + } + } + }, + "CatalogService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::CatalogService::Client", + "rpcs": { + "CreateEntryType": { + "methods": [ + "create_entry_type" + ] + }, + "UpdateEntryType": { + "methods": [ + "update_entry_type" + ] + }, + "DeleteEntryType": { + "methods": [ + "delete_entry_type" + ] + }, + "ListEntryTypes": { + "methods": [ + "list_entry_types" + ] + }, + "GetEntryType": { + "methods": [ + "get_entry_type" + ] + }, + "CreateAspectType": { + "methods": [ + "create_aspect_type" + ] + }, + "UpdateAspectType": { + "methods": [ + "update_aspect_type" + ] + }, + "DeleteAspectType": { + "methods": [ + "delete_aspect_type" + ] + }, + "ListAspectTypes": { + "methods": [ + "list_aspect_types" + ] + }, + "GetAspectType": { + "methods": [ + "get_aspect_type" + ] + }, + "CreateEntryGroup": { + "methods": [ + "create_entry_group" + ] + }, + "UpdateEntryGroup": { + "methods": [ + "update_entry_group" + ] + }, + "DeleteEntryGroup": { + "methods": [ + "delete_entry_group" + ] + }, + "ListEntryGroups": { + "methods": [ + "list_entry_groups" + ] + }, + "GetEntryGroup": { + "methods": [ + "get_entry_group" + ] + }, + "CreateEntry": { + "methods": [ + "create_entry" + ] + }, + "UpdateEntry": { + "methods": [ + "update_entry" + ] + }, + "DeleteEntry": { + "methods": [ + "delete_entry" + ] + }, + "ListEntries": { + "methods": [ + "list_entries" + ] + }, + "GetEntry": { + "methods": [ + "get_entry" + ] + }, + "LookupEntry": { + "methods": [ + "lookup_entry" + ] + }, + "SearchEntries": { + "methods": [ + "search_entries" + ] + } + } + } + } + }, + "ContentService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::ContentService::Client", + "rpcs": { + "CreateContent": { + "methods": [ + "create_content" + ] + }, + "UpdateContent": { + "methods": [ + "update_content" + ] + }, + "DeleteContent": { + "methods": [ + "delete_content" + ] + }, + "GetContent": { + "methods": [ + "get_content" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "ListContent": { + "methods": [ + "list_content" + ] + } + } + } + } + }, + "DataTaxonomyService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client", + "rpcs": { + "CreateDataTaxonomy": { + "methods": [ + "create_data_taxonomy" + ] + }, + "UpdateDataTaxonomy": { + "methods": [ + "update_data_taxonomy" + ] + }, + "DeleteDataTaxonomy": { + "methods": [ + "delete_data_taxonomy" + ] + }, + "ListDataTaxonomies": { + "methods": [ + "list_data_taxonomies" + ] + }, + "GetDataTaxonomy": { + "methods": [ + "get_data_taxonomy" + ] + }, + "CreateDataAttributeBinding": { + "methods": [ + "create_data_attribute_binding" + ] + }, + "UpdateDataAttributeBinding": { + "methods": [ + "update_data_attribute_binding" + ] + }, + "DeleteDataAttributeBinding": { + "methods": [ + "delete_data_attribute_binding" + ] + }, + "ListDataAttributeBindings": { + "methods": [ + "list_data_attribute_bindings" + ] + }, + "GetDataAttributeBinding": { + "methods": [ + "get_data_attribute_binding" + ] + }, + "CreateDataAttribute": { + "methods": [ + "create_data_attribute" + ] + }, + "UpdateDataAttribute": { + "methods": [ + "update_data_attribute" + ] + }, + "DeleteDataAttribute": { + "methods": [ + "delete_data_attribute" + ] + }, + "ListDataAttributes": { + "methods": [ + "list_data_attributes" + ] + }, + "GetDataAttribute": { + "methods": [ + "get_data_attribute" + ] + } + } + } + } + }, + "DataScanService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::DataScanService::Client", + "rpcs": { + "CreateDataScan": { + "methods": [ + "create_data_scan" + ] + }, + "UpdateDataScan": { + "methods": [ + "update_data_scan" + ] + }, + "DeleteDataScan": { + "methods": [ + "delete_data_scan" + ] + }, + "GetDataScan": { + "methods": [ + "get_data_scan" + ] + }, + "ListDataScans": { + "methods": [ + "list_data_scans" + ] + }, + "RunDataScan": { + "methods": [ + "run_data_scan" + ] + }, + "GetDataScanJob": { + "methods": [ + "get_data_scan_job" + ] + }, + "ListDataScanJobs": { + "methods": [ + "list_data_scan_jobs" + ] + }, + "GenerateDataQualityRules": { + "methods": [ + "generate_data_quality_rules" + ] + } + } + } + } + }, + "MetadataService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::MetadataService::Client", + "rpcs": { + "CreateEntity": { + "methods": [ + "create_entity" + ] + }, + "UpdateEntity": { + "methods": [ + "update_entity" + ] + }, + "DeleteEntity": { + "methods": [ + "delete_entity" + ] + }, + "GetEntity": { + "methods": [ + "get_entity" + ] + }, + "ListEntities": { + "methods": [ + "list_entities" + ] + }, + "CreatePartition": { + "methods": [ + "create_partition" + ] + }, + "DeletePartition": { + "methods": [ + "delete_partition" + ] + }, + "GetPartition": { + "methods": [ + "get_partition" + ] + }, + "ListPartitions": { + "methods": [ + "list_partitions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec b/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec new file mode 100644 index 000000000000..fa222f4abb34 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/dataplex/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-dataplex-v1" + gem.version = Google::Cloud::Dataplex::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. Note that google-cloud-dataplex-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dataplex instead. See the readme for more details." + gem.summary = "Dataplex API is used to manage the lifecycle of data lakes." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", ">= 0.7", "< 2.a" + gem.add_dependency "google-iam-v1", ">= 0.7", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb new file mode 100644 index 000000000000..6a853eb65247 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/dataplex/v1" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb new file mode 100644 index 000000000000..a3347b7c69df --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/dataplex_service" +require "google/cloud/dataplex/v1/catalog_service" +require "google/cloud/dataplex/v1/content_service" +require "google/cloud/dataplex/v1/data_taxonomy_service" +require "google/cloud/dataplex/v1/data_scan_service" +require "google/cloud/dataplex/v1/metadata_service" +require "google/cloud/dataplex/v1/version" + +module Google + module Cloud + module Dataplex + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/dataplex/v1" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/dataplex/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb new file mode 100644 index 000000000000..86e65c604fd7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/analyze.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/resources_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/dataplex/v1/analyze.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\r\n\x0b\x45nvironment\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#dataplex.googleapis.com/Environment\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x06 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.Environment.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12Z\n\x13infrastructure_spec\x18\x64 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Environment.InfrastructureSpecB\x03\xe0\x41\x02\x12L\n\x0csession_spec\x18\x65 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Environment.SessionSpecB\x03\xe0\x41\x01\x12P\n\x0esession_status\x18\x66 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.Environment.SessionStatusB\x03\xe0\x41\x03\x12H\n\tendpoints\x18\xc8\x01 \x01(\x0b\x32/.google.cloud.dataplex.v1.Environment.EndpointsB\x03\xe0\x41\x03\x1a\xe5\x04\n\x12InfrastructureSpec\x12\x61\n\x07\x63ompute\x18\x32 \x01(\x0b\x32I.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResourcesB\x03\xe0\x41\x01H\x00\x12`\n\x08os_image\x18\x64 \x01(\x0b\x32G.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntimeB\x03\xe0\x41\x02H\x01\x1a\x63\n\x10\x43omputeResources\x12\x19\n\x0c\x64isk_size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\nnode_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1b\n\x0emax_node_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x1a\x8c\x02\n\x0eOsImageRuntime\x12\x1a\n\rimage_version\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0ejava_libraries\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fpython_packages\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12p\n\nproperties\x18\x04 \x03(\x0b\x32W.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.PropertiesEntryB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0b\n\tresourcesB\t\n\x07runtime\x1aj\n\x0bSessionSpec\x12\x39\n\x11max_idle_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12 \n\x13\x65nable_fast_startup\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a$\n\rSessionStatus\x12\x13\n\x06\x61\x63tive\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x35\n\tEndpoints\x12\x16\n\tnotebooks\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03sql\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:y\xea\x41v\n#dataplex.googleapis.com/Environment\x12Oprojects/{project}/locations/{location}/lakes/{lake}/environments/{environment}\"\xa6\x07\n\x07\x43ontent\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Content\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06labels\x18\x06 \x03(\x0b\x32-.google.cloud.dataplex.v1.Content.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\tdata_text\x18\t \x01(\tB\x03\xe0\x41\x02H\x00\x12\x41\n\nsql_script\x18\x64 \x01(\x0b\x32+.google.cloud.dataplex.v1.Content.SqlScriptH\x01\x12>\n\x08notebook\x18\x65 \x01(\x0b\x32*.google.cloud.dataplex.v1.Content.NotebookH\x01\x1a\x91\x01\n\tSqlScript\x12L\n\x06\x65ngine\x18\x01 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.Content.SqlScript.QueryEngineB\x03\xe0\x41\x02\"6\n\x0bQueryEngine\x12\x1c\n\x18QUERY_ENGINE_UNSPECIFIED\x10\x00\x12\t\n\x05SPARK\x10\x02\x1a\x93\x01\n\x08Notebook\x12O\n\x0bkernel_type\x18\x01 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.Content.Notebook.KernelTypeB\x03\xe0\x41\x02\"6\n\nKernelType\x12\x1b\n\x17KERNEL_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PYTHON3\x10\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:l\xea\x41i\n\x1f\x64\x61taplex.googleapis.com/Content\x12\x46projects/{project}/locations/{location}/lakes/{lake}/content/{content}B\x06\n\x04\x64\x61taB\t\n\x07\x63ontent\"\xcd\x02\n\x07Session\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Session\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\x05state\x18\x04 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03:\x89\x01\xea\x41\x85\x01\n\x1f\x64\x61taplex.googleapis.com/Session\x12\x62projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}Bh\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x41nalyzeProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment").msgclass + Environment::InfrastructureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec").msgclass + Environment::InfrastructureSpec::ComputeResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources").msgclass + Environment::InfrastructureSpec::OsImageRuntime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime").msgclass + Environment::SessionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.SessionSpec").msgclass + Environment::SessionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.SessionStatus").msgclass + Environment::Endpoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.Endpoints").msgclass + Content = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content").msgclass + Content::SqlScript = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.SqlScript").msgclass + Content::SqlScript::QueryEngine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.SqlScript.QueryEngine").enummodule + Content::Notebook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.Notebook").msgclass + Content::Notebook::KernelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.Notebook.KernelType").enummodule + Session = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Session").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb new file mode 100644 index 000000000000..2760d6770459 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb @@ -0,0 +1,423 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/config" + +module Google + module Cloud + module Dataplex + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/dataplex/v1/rest" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = Configuration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + + ## + # @private + # Configuration class for the google.cloud.dataplex.v1 package. + # + # This class contains common configuration for all services + # of the google.cloud.dataplex.v1 package. + # + # This configuration is for internal use of the client library classes, + # and it is not intended that the end-users will read or change it. + # + class Configuration + extend ::Gapic::Config + + # @private + # Overrides for http bindings for the RPC of the mixins for this package. + # Services in this package should use these when creating clients for the mixin services. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb new file mode 100644 index 000000000000..a3ce27a01b7e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/catalog.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/service_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/dataplex/v1/catalog.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd3\r\n\nAspectType\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.AspectType.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12N\n\rauthorization\x18\x34 \x01(\x0b\x32\x32.google.cloud.dataplex.v1.AspectType.AuthorizationB\x03\xe0\x41\x05\x12U\n\x11metadata_template\x18\x35 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x02\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a\xa4\x07\n\x10MetadataTemplate\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12Q\n\rrecord_fields\x18\x06 \x03(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12Y\n\x0b\x65num_values\x18\x08 \x03(\x0b\x32?.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValueB\x03\xe0\x41\x01\x12M\n\tmap_items\x18\n \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12O\n\x0b\x61rray_items\x18\x0b \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12\x14\n\x07type_id\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08type_ref\x18\r \x01(\tB\x03\xe0\x41\x01\x12[\n\x0b\x63onstraints\x18\x32 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.ConstraintsB\x03\xe0\x41\x01\x12[\n\x0b\x61nnotations\x18\x33 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.AnnotationsB\x03\xe0\x41\x01\x1aK\n\tEnumValue\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ndeprecated\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0b\x43onstraints\x12\x15\n\x08required\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xad\x01\n\x0b\x41nnotations\x12\x17\n\ndeprecated\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdisplay_order\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bstring_type\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rstring_values\x18\x07 \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/AspectType\x12\x41projects/{project}/locations/{location}/aspectTypes/{aspect_type}*\x0b\x61spectTypes2\naspectType\"\xcd\x04\n\nEntryGroup\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.EntryGroup.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/EntryGroup\x12\x41projects/{project}/locations/{location}/entryGroups/{entry_group}*\x0b\x65ntryGroups2\nentryGroup\"\xdc\x06\n\tEntryType\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x06labels\x18\x07 \x03(\x0b\x32/.google.cloud.dataplex.v1.EntryType.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0ctype_aliases\x18\t \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08platform\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06system\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12H\n\x10required_aspects\x18\x32 \x03(\x0b\x32..google.cloud.dataplex.v1.EntryType.AspectInfo\x12M\n\rauthorization\x18\x33 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.EntryType.AuthorizationB\x03\xe0\x41\x05\x1a\x43\n\nAspectInfo\x12\x35\n\x04type\x18\x01 \x01(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:~\xea\x41{\n!dataplex.googleapis.com/EntryType\x12?projects/{project}/locations/{location}/entryTypes/{entry_type}*\nentryTypes2\tentryType\"\x91\x02\n\x06\x41spect\x12\x18\n\x0b\x61spect_type\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12*\n\x04\x64\x61ta\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\x12\x42\n\raspect_source\x18\t \x01(\x0b\x32&.google.cloud.dataplex.v1.AspectSourceB\x03\xe0\x41\x01\"p\n\x0c\x41spectSource\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc4\x04\n\x05\x45ntry\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\nentry_type\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07\x61spects\x18\t \x03(\x0b\x32,.google.cloud.dataplex.v1.Entry.AspectsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0cparent_entry\x18\n \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05\x12!\n\x14\x66ully_qualified_name\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12@\n\x0c\x65ntry_source\x18\x0f \x01(\x0b\x32%.google.cloud.dataplex.v1.EntrySourceB\x03\xe0\x41\x01\x1aP\n\x0c\x41spectsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .google.cloud.dataplex.v1.Aspect:\x02\x38\x01:\x86\x01\xea\x41\x82\x01\n\x1d\x64\x61taplex.googleapis.com/Entry\x12Qprojects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}*\x07\x65ntries2\x05\x65ntry\"\xba\x03\n\x0b\x45ntrySource\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x0e\n\x06system\x18\x02 \x01(\t\x12\x10\n\x08platform\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x41\n\x06labels\x18\x07 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.EntrySource.LabelsEntry\x12\x46\n\tancestors\x18\t \x03(\x0b\x32..google.cloud.dataplex.v1.EntrySource.AncestorB\x03\xe0\x41\x05\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x30\n\x08\x41ncestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xcd\x01\n\x17\x43reateEntryGroupRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x65ntry_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x65ntry_group\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateEntryGroupRequest\x12>\n\x0b\x65ntry_group\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListEntryGroupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListEntryGroupsResponse\x12:\n\x0c\x65ntry_groups\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.EntryGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\"\xc9\x01\n\x16\x43reateEntryTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1a\n\rentry_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\nentry_type\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x16UpdateEntryTypeRequest\x12<\n\nentry_type\x18\x01 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"d\n\x16\x44\x65leteEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n\x15ListEntryTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x16ListEntryTypesResponse\x12\x38\n\x0b\x65ntry_types\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.EntryType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"N\n\x13GetEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\"\xcd\x01\n\x17\x43reateAspectTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x61spect_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x61spect_type\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateAspectTypeRequest\x12>\n\x0b\x61spect_type\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListAspectTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListAspectTypesResponse\x12:\n\x0c\x61spect_types\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.AspectType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\"\x9c\x01\n\x12\x43reateEntryRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x15\n\x08\x65ntry_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x05\x65ntry\x18\x03 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\"\xda\x01\n\x12UpdateEntryRequest\x12\x33\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16\x64\x65lete_missing_aspects\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x61spect_keys\x18\x05 \x03(\tB\x03\xe0\x41\x01\"I\n\x12\x44\x65leteEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\x96\x01\n\x12ListEntriesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"`\n\x13ListEntriesResponse\x12\x30\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n\x0fGetEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\"\xc4\x01\n\x12LookupEntryRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x34\n\x05\x65ntry\x18\x05 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\x99\x01\n\x14SearchEntriesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05scope\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\xf6\x01\n\x13SearchEntriesResult\x12\x17\n\x0flinked_resource\x18\x08 \x01(\t\x12\x37\n\x0e\x64\x61taplex_entry\x18\t \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12H\n\x08snippets\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.SearchEntriesResult.Snippets\x1a\x43\n\x08Snippets\x12\x37\n\x0e\x64\x61taplex_entry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\"\x99\x01\n\x15SearchEntriesResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32-.google.cloud.dataplex.v1.SearchEntriesResult\x12\x12\n\ntotal_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x13\n\x0bunreachable\x18\x04 \x03(\t*Q\n\tEntryView\x12\x1a\n\x16\x45NTRY_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\x12\x07\n\x03\x41LL\x10\x04*p\n\x0eTransferStatus\x12\x1f\n\x1bTRANSFER_STATUS_UNSPECIFIED\x10\x00\x12\x1c\n\x18TRANSFER_STATUS_MIGRATED\x10\x01\x12\x1f\n\x1bTRANSFER_STATUS_TRANSFERRED\x10\x02\x32\x82#\n\x0e\x43\x61talogService\x12\xea\x01\n\x0f\x43reateEntryType\x12\x30.google.cloud.dataplex.v1.CreateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x1fparent,entry_type,entry_type_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/entryTypes:\nentry_type\x12\xec\x01\n\x0fUpdateEntryType\x12\x30.google.cloud.dataplex.v1.UpdateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x16\x65ntry_type,update_mask\x82\xd3\xe4\x93\x02G29/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}:\nentry_type\x12\xce\x01\n\x0f\x44\x65leteEntryType\x12\x30.google.cloud.dataplex.v1.DeleteEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xb4\x01\n\x0eListEntryTypes\x12/.google.cloud.dataplex.v1.ListEntryTypesRequest\x1a\x30.google.cloud.dataplex.v1.ListEntryTypesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/entryTypes\x12\xa1\x01\n\x0cGetEntryType\x12-.google.cloud.dataplex.v1.GetEntryTypeRequest\x1a#.google.cloud.dataplex.v1.EntryType\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xf1\x01\n\x10\x43reateAspectType\x12\x31.google.cloud.dataplex.v1.CreateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41!parent,aspect_type,aspect_type_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/aspectTypes:\x0b\x61spect_type\x12\xf3\x01\n\x10UpdateAspectType\x12\x31.google.cloud.dataplex.v1.UpdateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41\x17\x61spect_type,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}:\x0b\x61spect_type\x12\xd1\x01\n\x10\x44\x65leteAspectType\x12\x31.google.cloud.dataplex.v1.DeleteAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xb8\x01\n\x0fListAspectTypes\x12\x30.google.cloud.dataplex.v1.ListAspectTypesRequest\x1a\x31.google.cloud.dataplex.v1.ListAspectTypesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/aspectTypes\x12\xa5\x01\n\rGetAspectType\x12..google.cloud.dataplex.v1.GetAspectTypeRequest\x1a$.google.cloud.dataplex.v1.AspectType\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xf1\x01\n\x10\x43reateEntryGroup\x12\x31.google.cloud.dataplex.v1.CreateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41!parent,entry_group,entry_group_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/entryGroups:\x0b\x65ntry_group\x12\xf3\x01\n\x10UpdateEntryGroup\x12\x31.google.cloud.dataplex.v1.UpdateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41\x17\x65ntry_group,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}:\x0b\x65ntry_group\x12\xd1\x01\n\x10\x44\x65leteEntryGroup\x12\x31.google.cloud.dataplex.v1.DeleteEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xb8\x01\n\x0fListEntryGroups\x12\x30.google.cloud.dataplex.v1.ListEntryGroupsRequest\x1a\x31.google.cloud.dataplex.v1.ListEntryGroupsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/entryGroups\x12\xa5\x01\n\rGetEntryGroup\x12..google.cloud.dataplex.v1.GetEntryGroupRequest\x1a$.google.cloud.dataplex.v1.EntryGroup\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xbe\x01\n\x0b\x43reateEntry\x12,.google.cloud.dataplex.v1.CreateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"`\xda\x41\x15parent,entry,entry_id\x82\xd3\xe4\x93\x02\x42\"9/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:\x05\x65ntry\x12\xc1\x01\n\x0bUpdateEntry\x12,.google.cloud.dataplex.v1.UpdateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"c\xda\x41\x11\x65ntry,update_mask\x82\xd3\xe4\x93\x02I2@/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/**}:\x05\x65ntry\x12\xa7\x01\n\x0b\x44\x65leteEntry\x12,.google.cloud.dataplex.v1.DeleteEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\xb6\x01\n\x0bListEntries\x12,.google.cloud.dataplex.v1.ListEntriesRequest\x1a-.google.cloud.dataplex.v1.ListEntriesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/entryGroups/*}/entries\x12\xa1\x01\n\x08GetEntry\x12).google.cloud.dataplex.v1.GetEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\x93\x01\n\x0bLookupEntry\x12,.google.cloud.dataplex.v1.LookupEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*}:lookupEntry\x12\xb6\x01\n\rSearchEntries\x12..google.cloud.dataplex.v1.SearchEntriesRequest\x1a/.google.cloud.dataplex.v1.SearchEntriesResponse\"D\xda\x41\nname,query\x82\xd3\xe4\x93\x02\x31\"//v1/{name=projects/*/locations/*}:searchEntries\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbc\x01\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x43\x61talogProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xaa\x02\x18Google.Cloud.Dataplex.V1\xca\x02\x18Google\\Cloud\\Dataplex\\V1\xea\x02\x1bGoogle::Cloud::Dataplex::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Struct", "google/protobuf/struct.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + AspectType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType").msgclass + AspectType::Authorization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.Authorization").msgclass + AspectType::MetadataTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate").msgclass + AspectType::MetadataTemplate::EnumValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue").msgclass + AspectType::MetadataTemplate::Constraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints").msgclass + AspectType::MetadataTemplate::Annotations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations").msgclass + EntryGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryGroup").msgclass + EntryType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryType").msgclass + EntryType::AspectInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryType.AspectInfo").msgclass + EntryType::Authorization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryType.Authorization").msgclass + Aspect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Aspect").msgclass + AspectSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectSource").msgclass + Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Entry").msgclass + EntrySource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntrySource").msgclass + EntrySource::Ancestor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntrySource.Ancestor").msgclass + CreateEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEntryGroupRequest").msgclass + UpdateEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEntryGroupRequest").msgclass + DeleteEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEntryGroupRequest").msgclass + ListEntryGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryGroupsRequest").msgclass + ListEntryGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryGroupsResponse").msgclass + GetEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEntryGroupRequest").msgclass + CreateEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEntryTypeRequest").msgclass + UpdateEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEntryTypeRequest").msgclass + DeleteEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEntryTypeRequest").msgclass + ListEntryTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryTypesRequest").msgclass + ListEntryTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryTypesResponse").msgclass + GetEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEntryTypeRequest").msgclass + CreateAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateAspectTypeRequest").msgclass + UpdateAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateAspectTypeRequest").msgclass + DeleteAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteAspectTypeRequest").msgclass + ListAspectTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAspectTypesRequest").msgclass + ListAspectTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAspectTypesResponse").msgclass + GetAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetAspectTypeRequest").msgclass + CreateEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEntryRequest").msgclass + UpdateEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEntryRequest").msgclass + DeleteEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEntryRequest").msgclass + ListEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntriesRequest").msgclass + ListEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntriesResponse").msgclass + GetEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEntryRequest").msgclass + LookupEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.LookupEntryRequest").msgclass + SearchEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesRequest").msgclass + SearchEntriesResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesResult").msgclass + SearchEntriesResult::Snippets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesResult.Snippets").msgclass + SearchEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesResponse").msgclass + EntryView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryView").enummodule + TransferStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.TransferStatus").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb new file mode 100644 index 000000000000..23ba3815dfd4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +require "google/cloud/dataplex/v1/catalog_service/credentials" +require "google/cloud/dataplex/v1/catalog_service/paths" +require "google/cloud/dataplex/v1/catalog_service/operations" +require "google/cloud/dataplex/v1/catalog_service/client" +require "google/cloud/dataplex/v1/catalog_service/rest" + +module Google + module Cloud + module Dataplex + module 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. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/catalog_service" + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dataplex/v1/catalog_service/rest" + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + module CatalogService + end + end + end + end +end + +helper_path = ::File.join __dir__, "catalog_service", "helpers.rb" +require "google/cloud/dataplex/v1/catalog_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb new file mode 100644 index 000000000000..7a7b990936b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb @@ -0,0 +1,2797 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/catalog_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + ## + # Client for the CatalogService service. + # + # 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. + # + class Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :catalog_service_stub + + ## + # Configure the CatalogService Client class. + # + # See {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CatalogService clients + # ::Google::Cloud::Dataplex::V1::CatalogService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_entry_type.timeout = 60.0 + + default_config.rpcs.update_entry_type.timeout = 60.0 + + default_config.rpcs.delete_entry_type.timeout = 60.0 + + default_config.rpcs.list_entry_types.timeout = 60.0 + default_config.rpcs.list_entry_types.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry_type.timeout = 60.0 + default_config.rpcs.get_entry_type.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_aspect_type.timeout = 60.0 + + default_config.rpcs.update_aspect_type.timeout = 60.0 + + default_config.rpcs.delete_aspect_type.timeout = 60.0 + + default_config.rpcs.list_aspect_types.timeout = 60.0 + default_config.rpcs.list_aspect_types.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_aspect_type.timeout = 60.0 + default_config.rpcs.get_aspect_type.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_entry_group.timeout = 60.0 + + default_config.rpcs.update_entry_group.timeout = 60.0 + + default_config.rpcs.delete_entry_group.timeout = 60.0 + + default_config.rpcs.list_entry_groups.timeout = 60.0 + default_config.rpcs.list_entry_groups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry_group.timeout = 60.0 + default_config.rpcs.get_entry_group.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_entry.timeout = 60.0 + + default_config.rpcs.update_entry.timeout = 60.0 + default_config.rpcs.update_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.delete_entry.timeout = 60.0 + + default_config.rpcs.list_entries.timeout = 20.0 + default_config.rpcs.list_entries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry.timeout = 20.0 + default_config.rpcs.get_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.lookup_entry.timeout = 20.0 + default_config.rpcs.lookup_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.search_entries.timeout = 60.0 + default_config.rpcs.search_entries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CatalogService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @catalog_service_stub.universe_domain + end + + ## + # Create a new CatalogService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CatalogService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/catalog_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @catalog_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::CatalogService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @catalog_service_stub.endpoint + config.universe_domain = @catalog_service_stub.universe_domain + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @catalog_service_stub.endpoint + config.universe_domain = @catalog_service_stub.universe_domain + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::CatalogService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Creates an EntryType + # + # @overload create_entry_type(request, options = nil) + # Pass arguments to `create_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_entry_type(parent: nil, entry_type_id: nil, entry_type: nil, validate_only: nil) + # Pass arguments to `create_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the EntryType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a GCP region. + # @param entry_type_id [::String] + # Required. EntryType identifier. + # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] + # Required. EntryType Resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new + # + # # Call the create_entry_type method. + # result = client.create_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_entry_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :create_entry_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a EntryType resource. + # + # @overload update_entry_type(request, options = nil) + # Pass arguments to `update_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_entry_type(entry_type: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] + # Required. EntryType Resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new + # + # # Call the update_entry_type method. + # result = client.update_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.entry_type&.name + header_params["entry_type.name"] = request.entry_type.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_entry_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :update_entry_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a EntryType resource. + # + # @overload delete_entry_type(request, options = nil) + # Pass arguments to `delete_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_entry_type(name: nil, etag: nil) + # Pass arguments to `delete_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryTypeRequest method returns an ABORTED error response + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new + # + # # Call the delete_entry_type method. + # result = client.delete_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_entry_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :delete_entry_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists EntryType resources in a project and location. + # + # @overload list_entry_types(request, options = nil) + # Pass arguments to `list_entry_types` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntryTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_entry_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_entry_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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 order_by [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new + # + # # Call the list_entry_types method. + # result = client.list_entry_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. + # p item + # end + # + def list_entry_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_entry_types.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_entry_types.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_entry_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :list_entry_types, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entry_types, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a EntryType resource. + # + # @overload get_entry_type(request, options = nil) + # Pass arguments to `get_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_entry_type(name: nil) + # Pass arguments to `get_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryType] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new + # + # # Call the get_entry_type method. + # result = client.get_entry_type request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. + # p result + # + def get_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_entry_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :get_entry_type, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an AspectType + # + # @overload create_aspect_type(request, options = nil) + # Pass arguments to `create_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_aspect_type(parent: nil, aspect_type_id: nil, aspect_type: nil, validate_only: nil) + # Pass arguments to `create_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the AspectType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a GCP region. + # @param aspect_type_id [::String] + # Required. AspectType identifier. + # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] + # Required. AspectType Resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new + # + # # Call the create_aspect_type method. + # result = client.create_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_aspect_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :create_aspect_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a AspectType resource. + # + # @overload update_aspect_type(request, options = nil) + # Pass arguments to `update_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_aspect_type(aspect_type: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] + # Required. AspectType Resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new + # + # # Call the update_aspect_type method. + # result = client.update_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.aspect_type&.name + header_params["aspect_type.name"] = request.aspect_type.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_aspect_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :update_aspect_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a AspectType resource. + # + # @overload delete_aspect_type(request, options = nil) + # Pass arguments to `delete_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_aspect_type(name: nil, etag: nil) + # Pass arguments to `delete_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteAspectTypeRequest method returns an ABORTED error response + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new + # + # # Call the delete_aspect_type method. + # result = client.delete_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_aspect_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :delete_aspect_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists AspectType resources in a project and location. + # + # @overload list_aspect_types(request, options = nil) + # Pass arguments to `list_aspect_types` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAspectTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_aspect_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_aspect_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # 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. + # @param page_token [::String] + # 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. + # @param filter [::String] + # 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 order_by [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new + # + # # Call the list_aspect_types method. + # result = client.list_aspect_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. + # p item + # end + # + def list_aspect_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_aspect_types.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_aspect_types.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_aspect_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :list_aspect_types, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_aspect_types, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a AspectType resource. + # + # @overload get_aspect_type(request, options = nil) + # Pass arguments to `get_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_aspect_type(name: nil) + # Pass arguments to `get_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::AspectType] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new + # + # # Call the get_aspect_type method. + # result = client.get_aspect_type request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. + # p result + # + def get_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_aspect_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :get_aspect_type, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an EntryGroup + # + # @overload create_entry_group(request, options = nil) + # Pass arguments to `create_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil, validate_only: nil) + # Pass arguments to `create_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 entry_group_id [::String] + # Required. EntryGroup identifier. + # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] + # Required. EntryGroup Resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new + # + # # Call the create_entry_group method. + # result = client.create_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_entry_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :create_entry_group, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a EntryGroup resource. + # + # @overload update_entry_group(request, options = nil) + # Pass arguments to `update_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_entry_group(entry_group: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] + # Required. EntryGroup Resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new + # + # # Call the update_entry_group method. + # result = client.update_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.entry_group&.name + header_params["entry_group.name"] = request.entry_group.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_entry_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :update_entry_group, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a EntryGroup resource. + # + # @overload delete_entry_group(request, options = nil) + # Pass arguments to `delete_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_entry_group(name: nil, etag: nil) + # Pass arguments to `delete_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryGroupRequest method returns an ABORTED error response + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new + # + # # Call the delete_entry_group method. + # result = client.delete_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_entry_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :delete_entry_group, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists EntryGroup resources in a project and location. + # + # @overload list_entry_groups(request, options = nil) + # Pass arguments to `list_entry_groups` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_entry_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_entry_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # 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. + # @param page_token [::String] + # 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. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new + # + # # Call the list_entry_groups method. + # result = client.list_entry_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. + # p item + # end + # + def list_entry_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_entry_groups.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_entry_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_entry_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :list_entry_groups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entry_groups, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a EntryGroup resource. + # + # @overload get_entry_group(request, options = nil) + # Pass arguments to `get_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_entry_group(name: nil) + # Pass arguments to `get_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryGroup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new + # + # # Call the get_entry_group method. + # result = client.get_entry_group request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. + # p result + # + def get_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_entry_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :get_entry_group, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an Entry. + # + # @overload create_entry(request, options = nil) + # Pass arguments to `create_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_entry(parent: nil, entry_id: nil, entry: nil) + # Pass arguments to `create_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @param entry_id [::String] + # 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 + # `//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 + # Cloud. + # + # The maximum size of the field is 4000 characters. + # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] + # Required. Entry resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new + # + # # Call the create_entry method. + # result = client.create_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def create_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :create_entry, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an Entry. + # + # @overload update_entry(request, options = nil) + # Pass arguments to `update_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_entry(entry: nil, update_mask: nil, allow_missing: nil, delete_missing_aspects: nil, aspect_keys: nil) + # Pass arguments to `update_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] + # Required. Entry resource. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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. + # @param allow_missing [::Boolean] + # Optional. If set to true and the entry does not exist, it will be created. + # @param delete_missing_aspects [::Boolean] + # 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. + # @param aspect_keys [::Array<::String>] + # 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 + # `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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new + # + # # Call the update_entry method. + # result = client.update_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def update_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.entry&.name + header_params["entry.name"] = request.entry.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :update_entry, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an Entry. + # + # @overload delete_entry(request, options = nil) + # Pass arguments to `delete_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_entry(name: nil) + # Pass arguments to `delete_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new + # + # # Call the delete_entry method. + # result = client.delete_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def delete_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :delete_entry, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists entries within an entry group. + # + # @overload list_entries(request, options = nil) + # Pass arguments to `list_entries` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_entries(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_entries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @param page_size [::Integer] + # @param page_token [::String] + # Optional. The pagination token returned by a previous request. + # @param filter [::String] + # 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" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new + # + # # Call the list_entries method. + # result = client.list_entries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. + # p item + # end + # + def list_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_entries.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_entries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :list_entries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entries, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a single entry. + # + # @overload get_entry(request, options = nil) + # Pass arguments to `get_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_entry(name: nil, view: nil, aspect_types: nil, paths: nil) + # Pass arguments to `get_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @param view [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View for controlling which parts of an entry are to be returned. + # @param aspect_types [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # Only works if the CUSTOM view is selected. + # @param paths [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. Only works if the CUSTOM view is selected. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryRequest.new + # + # # Call the get_entry method. + # result = client.get_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def get_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :get_entry, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Looks up a single entry. + # + # @overload lookup_entry(request, options = nil) + # Pass arguments to `lookup_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::LookupEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload lookup_entry(name: nil, view: nil, aspect_types: nil, paths: nil, entry: nil) + # Pass arguments to `lookup_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/{location}`. + # @param view [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View for controlling which parts of an entry are to be returned. + # @param aspect_types [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # Only works if the CUSTOM view is selected. + # @param paths [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. Only works if the CUSTOM view is selected. + # @param entry [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new + # + # # Call the lookup_entry method. + # result = client.lookup_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def lookup_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.lookup_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.lookup_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lookup_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :lookup_entry, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Searches for entries matching given query and scope. + # + # @overload search_entries(request, options = nil) + # Pass arguments to `search_entries` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::SearchEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil) + # Pass arguments to `search_entries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/{location}`. + # @param query [::String] + # Required. The query against which entries in scope should be matched. + # @param page_size [::Integer] + # Optional. Pagination. + # @param page_token [::String] + # @param order_by [::String] + # Optional. Ordering of the results. Supported options to be added later. + # @param scope [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new + # + # # Call the search_entries method. + # result = client.search_entries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. + # p item + # end + # + def search_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::SearchEntriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_entries.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_entries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :search_entries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :search_entries, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CatalogService API. + # + # This class represents the configuration for CatalogService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_entry_type to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::CatalogService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_entry_type.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_entry_type.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CatalogService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry_type + ## + # RPC-specific configuration for `update_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry_type + ## + # RPC-specific configuration for `delete_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry_type + ## + # RPC-specific configuration for `list_entry_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entry_types + ## + # RPC-specific configuration for `get_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry_type + ## + # RPC-specific configuration for `create_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :create_aspect_type + ## + # RPC-specific configuration for `update_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :update_aspect_type + ## + # RPC-specific configuration for `delete_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_aspect_type + ## + # RPC-specific configuration for `list_aspect_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_aspect_types + ## + # RPC-specific configuration for `get_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_aspect_type + ## + # RPC-specific configuration for `create_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry_group + ## + # RPC-specific configuration for `update_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry_group + ## + # RPC-specific configuration for `delete_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry_group + ## + # RPC-specific configuration for `list_entry_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entry_groups + ## + # RPC-specific configuration for `get_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry_group + ## + # RPC-specific configuration for `create_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry + ## + # RPC-specific configuration for `update_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry + ## + # RPC-specific configuration for `delete_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry + ## + # RPC-specific configuration for `list_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entries + ## + # RPC-specific configuration for `get_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry + ## + # RPC-specific configuration for `lookup_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_entry + ## + # RPC-specific configuration for `search_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :search_entries + + # @private + def initialize parent_rpcs = nil + create_entry_type_config = parent_rpcs.create_entry_type if parent_rpcs.respond_to? :create_entry_type + @create_entry_type = ::Gapic::Config::Method.new create_entry_type_config + update_entry_type_config = parent_rpcs.update_entry_type if parent_rpcs.respond_to? :update_entry_type + @update_entry_type = ::Gapic::Config::Method.new update_entry_type_config + delete_entry_type_config = parent_rpcs.delete_entry_type if parent_rpcs.respond_to? :delete_entry_type + @delete_entry_type = ::Gapic::Config::Method.new delete_entry_type_config + list_entry_types_config = parent_rpcs.list_entry_types if parent_rpcs.respond_to? :list_entry_types + @list_entry_types = ::Gapic::Config::Method.new list_entry_types_config + get_entry_type_config = parent_rpcs.get_entry_type if parent_rpcs.respond_to? :get_entry_type + @get_entry_type = ::Gapic::Config::Method.new get_entry_type_config + create_aspect_type_config = parent_rpcs.create_aspect_type if parent_rpcs.respond_to? :create_aspect_type + @create_aspect_type = ::Gapic::Config::Method.new create_aspect_type_config + update_aspect_type_config = parent_rpcs.update_aspect_type if parent_rpcs.respond_to? :update_aspect_type + @update_aspect_type = ::Gapic::Config::Method.new update_aspect_type_config + delete_aspect_type_config = parent_rpcs.delete_aspect_type if parent_rpcs.respond_to? :delete_aspect_type + @delete_aspect_type = ::Gapic::Config::Method.new delete_aspect_type_config + list_aspect_types_config = parent_rpcs.list_aspect_types if parent_rpcs.respond_to? :list_aspect_types + @list_aspect_types = ::Gapic::Config::Method.new list_aspect_types_config + get_aspect_type_config = parent_rpcs.get_aspect_type if parent_rpcs.respond_to? :get_aspect_type + @get_aspect_type = ::Gapic::Config::Method.new get_aspect_type_config + create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group + @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config + update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group + @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config + delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group + @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config + list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups + @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config + get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group + @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config + create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry + @create_entry = ::Gapic::Config::Method.new create_entry_config + update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry + @update_entry = ::Gapic::Config::Method.new update_entry_config + delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry + @delete_entry = ::Gapic::Config::Method.new delete_entry_config + list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries + @list_entries = ::Gapic::Config::Method.new list_entries_config + get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry + @get_entry = ::Gapic::Config::Method.new get_entry_config + lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry + @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config + search_entries_config = parent_rpcs.search_entries if parent_rpcs.respond_to? :search_entries + @search_entries = ::Gapic::Config::Method.new search_entries_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb new file mode 100644 index 000000000000..1b328b2e7752 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + # Credentials for the CatalogService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb new file mode 100644 index 000000000000..87e2bfd1d4a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb @@ -0,0 +1,801 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CatalogService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CatalogService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb new file mode 100644 index 000000000000..465f22f78019 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + # Path helper methods for the CatalogService API. + module Paths + ## + # Create a fully-qualified AspectType resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/aspectTypes/{aspect_type}` + # + # @param project [String] + # @param location [String] + # @param aspect_type [String] + # + # @return [::String] + def aspect_type_path project:, location:, aspect_type: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/aspectTypes/#{aspect_type}" + end + + ## + # Create a fully-qualified Entry resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}` + # + # @param project [String] + # @param location [String] + # @param entry_group [String] + # @param entry [String] + # + # @return [::String] + def entry_path project:, location:, entry_group:, entry: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "entry_group cannot contain /" if entry_group.to_s.include? "/" + + "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}/entries/#{entry}" + end + + ## + # Create a fully-qualified EntryGroup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/entryGroups/{entry_group}` + # + # @param project [String] + # @param location [String] + # @param entry_group [String] + # + # @return [::String] + def entry_group_path project:, location:, entry_group: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}" + end + + ## + # Create a fully-qualified EntryType resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/entryTypes/{entry_type}` + # + # @param project [String] + # @param location [String] + # @param entry_type [String] + # + # @return [::String] + def entry_type_path project:, location:, entry_type: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/entryTypes/#{entry_type}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb new file mode 100644 index 000000000000..364eb0c5e5a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/catalog_service/credentials" +require "google/cloud/dataplex/v1/catalog_service/paths" +require "google/cloud/dataplex/v1/catalog_service/rest/operations" +require "google/cloud/dataplex/v1/catalog_service/rest/client" + +module Google + module Cloud + module Dataplex + module 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. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/catalog_service/rest" + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + module CatalogService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/catalog_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb new file mode 100644 index 000000000000..398eb9db3daa --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb @@ -0,0 +1,2622 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/catalog_pb" +require "google/cloud/dataplex/v1/catalog_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + module Rest + ## + # REST client for the CatalogService service. + # + # 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. + # + class Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :catalog_service_stub + + ## + # Configure the CatalogService Client class. + # + # See {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CatalogService clients + # ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_entry_type.timeout = 60.0 + + default_config.rpcs.update_entry_type.timeout = 60.0 + + default_config.rpcs.delete_entry_type.timeout = 60.0 + + default_config.rpcs.list_entry_types.timeout = 60.0 + default_config.rpcs.list_entry_types.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry_type.timeout = 60.0 + default_config.rpcs.get_entry_type.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_aspect_type.timeout = 60.0 + + default_config.rpcs.update_aspect_type.timeout = 60.0 + + default_config.rpcs.delete_aspect_type.timeout = 60.0 + + default_config.rpcs.list_aspect_types.timeout = 60.0 + default_config.rpcs.list_aspect_types.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_aspect_type.timeout = 60.0 + default_config.rpcs.get_aspect_type.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_entry_group.timeout = 60.0 + + default_config.rpcs.update_entry_group.timeout = 60.0 + + default_config.rpcs.delete_entry_group.timeout = 60.0 + + default_config.rpcs.list_entry_groups.timeout = 60.0 + default_config.rpcs.list_entry_groups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry_group.timeout = 60.0 + default_config.rpcs.get_entry_group.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_entry.timeout = 60.0 + + default_config.rpcs.update_entry.timeout = 60.0 + default_config.rpcs.update_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.delete_entry.timeout = 60.0 + + default_config.rpcs.list_entries.timeout = 20.0 + default_config.rpcs.list_entries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry.timeout = 20.0 + default_config.rpcs.get_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.lookup_entry.timeout = 20.0 + default_config.rpcs.lookup_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.search_entries.timeout = 60.0 + default_config.rpcs.search_entries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CatalogService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @catalog_service_stub.universe_domain + end + + ## + # Create a new CatalogService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CatalogService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @catalog_service_stub = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @catalog_service_stub.endpoint + config.universe_domain = @catalog_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @catalog_service_stub.endpoint + config.universe_domain = @catalog_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::CatalogService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Creates an EntryType + # + # @overload create_entry_type(request, options = nil) + # Pass arguments to `create_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_entry_type(parent: nil, entry_type_id: nil, entry_type: nil, validate_only: nil) + # Pass arguments to `create_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the EntryType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a GCP region. + # @param entry_type_id [::String] + # Required. EntryType identifier. + # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] + # Required. EntryType Resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new + # + # # Call the create_entry_type method. + # result = client.create_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_entry_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_entry_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a EntryType resource. + # + # @overload update_entry_type(request, options = nil) + # Pass arguments to `update_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_entry_type(entry_type: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] + # Required. EntryType Resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new + # + # # Call the update_entry_type method. + # result = client.update_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_entry_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.update_entry_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a EntryType resource. + # + # @overload delete_entry_type(request, options = nil) + # Pass arguments to `delete_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_entry_type(name: nil, etag: nil) + # Pass arguments to `delete_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryTypeRequest method returns an ABORTED error response + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new + # + # # Call the delete_entry_type method. + # result = client.delete_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_entry_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.delete_entry_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists EntryType resources in a project and location. + # + # @overload list_entry_types(request, options = nil) + # Pass arguments to `list_entry_types` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntryTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_entry_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_entry_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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 order_by [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new + # + # # Call the list_entry_types method. + # result = client.list_entry_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. + # p item + # end + # + def list_entry_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_entry_types.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_entry_types.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_entry_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.list_entry_types request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a EntryType resource. + # + # @overload get_entry_type(request, options = nil) + # Pass arguments to `get_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_entry_type(name: nil) + # Pass arguments to `get_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new + # + # # Call the get_entry_type method. + # result = client.get_entry_type request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. + # p result + # + def get_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_entry_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_entry_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.get_entry_type request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an AspectType + # + # @overload create_aspect_type(request, options = nil) + # Pass arguments to `create_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_aspect_type(parent: nil, aspect_type_id: nil, aspect_type: nil, validate_only: nil) + # Pass arguments to `create_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the AspectType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a GCP region. + # @param aspect_type_id [::String] + # Required. AspectType identifier. + # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] + # Required. AspectType Resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new + # + # # Call the create_aspect_type method. + # result = client.create_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_aspect_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_aspect_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a AspectType resource. + # + # @overload update_aspect_type(request, options = nil) + # Pass arguments to `update_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_aspect_type(aspect_type: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] + # Required. AspectType Resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new + # + # # Call the update_aspect_type method. + # result = client.update_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_aspect_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.update_aspect_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a AspectType resource. + # + # @overload delete_aspect_type(request, options = nil) + # Pass arguments to `delete_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_aspect_type(name: nil, etag: nil) + # Pass arguments to `delete_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteAspectTypeRequest method returns an ABORTED error response + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new + # + # # Call the delete_aspect_type method. + # result = client.delete_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_aspect_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.delete_aspect_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists AspectType resources in a project and location. + # + # @overload list_aspect_types(request, options = nil) + # Pass arguments to `list_aspect_types` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAspectTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_aspect_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_aspect_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # 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. + # @param page_token [::String] + # 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. + # @param filter [::String] + # 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 order_by [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new + # + # # Call the list_aspect_types method. + # result = client.list_aspect_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. + # p item + # end + # + def list_aspect_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_aspect_types.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_aspect_types.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_aspect_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.list_aspect_types request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a AspectType resource. + # + # @overload get_aspect_type(request, options = nil) + # Pass arguments to `get_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_aspect_type(name: nil) + # Pass arguments to `get_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::AspectType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new + # + # # Call the get_aspect_type method. + # result = client.get_aspect_type request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. + # p result + # + def get_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_aspect_type.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_aspect_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.get_aspect_type request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an EntryGroup + # + # @overload create_entry_group(request, options = nil) + # Pass arguments to `create_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil, validate_only: nil) + # Pass arguments to `create_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 entry_group_id [::String] + # Required. EntryGroup identifier. + # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] + # Required. EntryGroup Resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new + # + # # Call the create_entry_group method. + # result = client.create_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_entry_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_entry_group request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a EntryGroup resource. + # + # @overload update_entry_group(request, options = nil) + # Pass arguments to `update_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_entry_group(entry_group: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] + # Required. EntryGroup Resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new + # + # # Call the update_entry_group method. + # result = client.update_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_entry_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.update_entry_group request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a EntryGroup resource. + # + # @overload delete_entry_group(request, options = nil) + # Pass arguments to `delete_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_entry_group(name: nil, etag: nil) + # Pass arguments to `delete_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryGroupRequest method returns an ABORTED error response + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new + # + # # Call the delete_entry_group method. + # result = client.delete_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_entry_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.delete_entry_group request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists EntryGroup resources in a project and location. + # + # @overload list_entry_groups(request, options = nil) + # Pass arguments to `list_entry_groups` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_entry_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_entry_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # 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. + # @param page_token [::String] + # 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. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new + # + # # Call the list_entry_groups method. + # result = client.list_entry_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. + # p item + # end + # + def list_entry_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_entry_groups.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_entry_groups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_entry_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.list_entry_groups request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a EntryGroup resource. + # + # @overload get_entry_group(request, options = nil) + # Pass arguments to `get_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_entry_group(name: nil) + # Pass arguments to `get_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new + # + # # Call the get_entry_group method. + # result = client.get_entry_group request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. + # p result + # + def get_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_entry_group.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_entry_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.get_entry_group request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an Entry. + # + # @overload create_entry(request, options = nil) + # Pass arguments to `create_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_entry(parent: nil, entry_id: nil, entry: nil) + # Pass arguments to `create_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @param entry_id [::String] + # 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 + # `//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 + # Cloud. + # + # The maximum size of the field is 4000 characters. + # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] + # Required. Entry resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new + # + # # Call the create_entry method. + # result = client.create_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def create_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_entry request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an Entry. + # + # @overload update_entry(request, options = nil) + # Pass arguments to `update_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_entry(entry: nil, update_mask: nil, allow_missing: nil, delete_missing_aspects: nil, aspect_keys: nil) + # Pass arguments to `update_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] + # Required. Entry resource. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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. + # @param allow_missing [::Boolean] + # Optional. If set to true and the entry does not exist, it will be created. + # @param delete_missing_aspects [::Boolean] + # 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. + # @param aspect_keys [::Array<::String>] + # 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 + # `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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new + # + # # Call the update_entry method. + # result = client.update_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def update_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.update_entry request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an Entry. + # + # @overload delete_entry(request, options = nil) + # Pass arguments to `delete_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_entry(name: nil) + # Pass arguments to `delete_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new + # + # # Call the delete_entry method. + # result = client.delete_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def delete_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.delete_entry request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists entries within an entry group. + # + # @overload list_entries(request, options = nil) + # Pass arguments to `list_entries` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_entries(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_entries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @param page_size [::Integer] + # @param page_token [::String] + # Optional. The pagination token returned by a previous request. + # @param filter [::String] + # 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" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new + # + # # Call the list_entries method. + # result = client.list_entries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. + # p item + # end + # + def list_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_entries.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_entries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.list_entries request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_entries, "entries", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a single entry. + # + # @overload get_entry(request, options = nil) + # Pass arguments to `get_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_entry(name: nil, view: nil, aspect_types: nil, paths: nil) + # Pass arguments to `get_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @param view [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View for controlling which parts of an entry are to be returned. + # @param aspect_types [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # Only works if the CUSTOM view is selected. + # @param paths [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. Only works if the CUSTOM view is selected. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryRequest.new + # + # # Call the get_entry method. + # result = client.get_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def get_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.get_entry request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Looks up a single entry. + # + # @overload lookup_entry(request, options = nil) + # Pass arguments to `lookup_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::LookupEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload lookup_entry(name: nil, view: nil, aspect_types: nil, paths: nil, entry: nil) + # Pass arguments to `lookup_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/{location}`. + # @param view [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View for controlling which parts of an entry are to be returned. + # @param aspect_types [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # Only works if the CUSTOM view is selected. + # @param paths [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. Only works if the CUSTOM view is selected. + # @param entry [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new + # + # # Call the lookup_entry method. + # result = client.lookup_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def lookup_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.lookup_entry.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.lookup_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lookup_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.lookup_entry request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Searches for entries matching given query and scope. + # + # @overload search_entries(request, options = nil) + # Pass arguments to `search_entries` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::SearchEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil) + # Pass arguments to `search_entries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/{location}`. + # @param query [::String] + # Required. The query against which entries in scope should be matched. + # @param page_size [::Integer] + # Optional. Pagination. + # @param page_token [::String] + # @param order_by [::String] + # Optional. Ordering of the results. Supported options to be added later. + # @param scope [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new + # + # # Call the search_entries method. + # result = client.search_entries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. + # p item + # end + # + def search_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::SearchEntriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.search_entries.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.search_entries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.search_entries request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CatalogService REST API. + # + # This class represents the configuration for CatalogService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_entry_type to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_entry_type.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_entry_type.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the CatalogService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry_type + ## + # RPC-specific configuration for `update_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry_type + ## + # RPC-specific configuration for `delete_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry_type + ## + # RPC-specific configuration for `list_entry_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entry_types + ## + # RPC-specific configuration for `get_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry_type + ## + # RPC-specific configuration for `create_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :create_aspect_type + ## + # RPC-specific configuration for `update_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :update_aspect_type + ## + # RPC-specific configuration for `delete_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_aspect_type + ## + # RPC-specific configuration for `list_aspect_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_aspect_types + ## + # RPC-specific configuration for `get_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_aspect_type + ## + # RPC-specific configuration for `create_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry_group + ## + # RPC-specific configuration for `update_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry_group + ## + # RPC-specific configuration for `delete_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry_group + ## + # RPC-specific configuration for `list_entry_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entry_groups + ## + # RPC-specific configuration for `get_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry_group + ## + # RPC-specific configuration for `create_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry + ## + # RPC-specific configuration for `update_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry + ## + # RPC-specific configuration for `delete_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry + ## + # RPC-specific configuration for `list_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entries + ## + # RPC-specific configuration for `get_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry + ## + # RPC-specific configuration for `lookup_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_entry + ## + # RPC-specific configuration for `search_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :search_entries + + # @private + def initialize parent_rpcs = nil + create_entry_type_config = parent_rpcs.create_entry_type if parent_rpcs.respond_to? :create_entry_type + @create_entry_type = ::Gapic::Config::Method.new create_entry_type_config + update_entry_type_config = parent_rpcs.update_entry_type if parent_rpcs.respond_to? :update_entry_type + @update_entry_type = ::Gapic::Config::Method.new update_entry_type_config + delete_entry_type_config = parent_rpcs.delete_entry_type if parent_rpcs.respond_to? :delete_entry_type + @delete_entry_type = ::Gapic::Config::Method.new delete_entry_type_config + list_entry_types_config = parent_rpcs.list_entry_types if parent_rpcs.respond_to? :list_entry_types + @list_entry_types = ::Gapic::Config::Method.new list_entry_types_config + get_entry_type_config = parent_rpcs.get_entry_type if parent_rpcs.respond_to? :get_entry_type + @get_entry_type = ::Gapic::Config::Method.new get_entry_type_config + create_aspect_type_config = parent_rpcs.create_aspect_type if parent_rpcs.respond_to? :create_aspect_type + @create_aspect_type = ::Gapic::Config::Method.new create_aspect_type_config + update_aspect_type_config = parent_rpcs.update_aspect_type if parent_rpcs.respond_to? :update_aspect_type + @update_aspect_type = ::Gapic::Config::Method.new update_aspect_type_config + delete_aspect_type_config = parent_rpcs.delete_aspect_type if parent_rpcs.respond_to? :delete_aspect_type + @delete_aspect_type = ::Gapic::Config::Method.new delete_aspect_type_config + list_aspect_types_config = parent_rpcs.list_aspect_types if parent_rpcs.respond_to? :list_aspect_types + @list_aspect_types = ::Gapic::Config::Method.new list_aspect_types_config + get_aspect_type_config = parent_rpcs.get_aspect_type if parent_rpcs.respond_to? :get_aspect_type + @get_aspect_type = ::Gapic::Config::Method.new get_aspect_type_config + create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group + @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config + update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group + @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config + delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group + @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config + list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups + @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config + get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group + @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config + create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry + @create_entry = ::Gapic::Config::Method.new create_entry_config + update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry + @update_entry = ::Gapic::Config::Method.new update_entry_config + delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry + @delete_entry = ::Gapic::Config::Method.new delete_entry_config + list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries + @list_entries = ::Gapic::Config::Method.new list_entries_config + get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry + @get_entry = ::Gapic::Config::Method.new get_entry_config + lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry + @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config + search_entries_config = parent_rpcs.search_entries if parent_rpcs.respond_to? :search_entries + @search_entries = ::Gapic::Config::Method.new search_entries_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb new file mode 100644 index 000000000000..989b9b05ba02 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb @@ -0,0 +1,895 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CatalogService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CatalogService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb new file mode 100644 index 000000000000..260110930560 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb @@ -0,0 +1,1375 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/catalog_pb" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + module Rest + ## + # REST service stub for the CatalogService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the create_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_entry_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_entry_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_entry_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_entry_types REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] + # A result object deserialized from the server's reply + def list_entry_types request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_entry_types_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # A result object deserialized from the server's reply + def get_entry_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::EntryType.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_aspect_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_aspect_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_aspect_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_aspect_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_aspect_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_aspect_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_aspect_types REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] + # A result object deserialized from the server's reply + def list_aspect_types request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_aspect_types_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::AspectType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # A result object deserialized from the server's reply + def get_aspect_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_aspect_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::AspectType.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_entry_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_entry_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_entry_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_entry_groups REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] + # A result object deserialized from the server's reply + def list_entry_groups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_entry_groups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # A result object deserialized from the server's reply + def get_entry_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::EntryGroup.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def create_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def update_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def delete_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_entries REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntriesResponse] + # A result object deserialized from the server's reply + def list_entries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_entries_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def get_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the lookup_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::LookupEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def lookup_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lookup_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the search_entries REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::SearchEntriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] + # A result object deserialized from the server's reply + def search_entries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_entries_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the create_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_entry_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/entryTypes", + body: "entry_type", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_entry_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{entry_type.name}", + body: "entry_type", + matches: [ + ["entry_type.name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_entry_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_entry_types REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_entry_types_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/entryTypes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_entry_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_aspect_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/aspectTypes", + body: "aspect_type", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_aspect_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{aspect_type.name}", + body: "aspect_type", + matches: [ + ["aspect_type.name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_aspect_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_aspect_types REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_aspect_types_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/aspectTypes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_aspect_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_entry_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/entryGroups", + body: "entry_group", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_entry_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{entry_group.name}", + body: "entry_group", + matches: [ + ["entry_group.name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_entry_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_entry_groups REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_entry_groups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/entryGroups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_entry_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/entries", + body: "entry", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{entry.name}", + body: "entry", + matches: [ + ["entry.name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_entries REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_entries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/entries", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the lookup_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::LookupEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_lookup_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:lookupEntry", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_entries REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::SearchEntriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_entries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:searchEntries", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb new file mode 100644 index 000000000000..9a6d7d621caf --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb @@ -0,0 +1,91 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/catalog.proto for package 'Google.Cloud.Dataplex.V1' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# + +require 'grpc' +require 'google/cloud/dataplex/v1/catalog_pb' + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + # 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. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.CatalogService' + + # Creates an EntryType + rpc :CreateEntryType, ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Google::Longrunning::Operation + # Updates a EntryType resource. + rpc :UpdateEntryType, ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Google::Longrunning::Operation + # Deletes a EntryType resource. + rpc :DeleteEntryType, ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Google::Longrunning::Operation + # Lists EntryType resources in a project and location. + rpc :ListEntryTypes, ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse + # Retrieves a EntryType resource. + rpc :GetEntryType, ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Google::Cloud::Dataplex::V1::EntryType + # Creates an AspectType + rpc :CreateAspectType, ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Google::Longrunning::Operation + # Updates a AspectType resource. + rpc :UpdateAspectType, ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Google::Longrunning::Operation + # Deletes a AspectType resource. + rpc :DeleteAspectType, ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Google::Longrunning::Operation + # Lists AspectType resources in a project and location. + rpc :ListAspectTypes, ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse + # Retrieves a AspectType resource. + rpc :GetAspectType, ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Google::Cloud::Dataplex::V1::AspectType + # Creates an EntryGroup + rpc :CreateEntryGroup, ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Google::Longrunning::Operation + # Updates a EntryGroup resource. + rpc :UpdateEntryGroup, ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Google::Longrunning::Operation + # Deletes a EntryGroup resource. + rpc :DeleteEntryGroup, ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Google::Longrunning::Operation + # Lists EntryGroup resources in a project and location. + rpc :ListEntryGroups, ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse + # Retrieves a EntryGroup resource. + rpc :GetEntryGroup, ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Google::Cloud::Dataplex::V1::EntryGroup + # Creates an Entry. + rpc :CreateEntry, ::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Google::Cloud::Dataplex::V1::Entry + # Updates an Entry. + rpc :UpdateEntry, ::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Google::Cloud::Dataplex::V1::Entry + # Deletes an Entry. + rpc :DeleteEntry, ::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Google::Cloud::Dataplex::V1::Entry + # Lists entries within an entry group. + rpc :ListEntries, ::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Google::Cloud::Dataplex::V1::ListEntriesResponse + # Gets a single entry. + rpc :GetEntry, ::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Google::Cloud::Dataplex::V1::Entry + # Looks up a single entry. + rpc :LookupEntry, ::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Google::Cloud::Dataplex::V1::Entry + # Searches for entries matching given query and scope. + rpc :SearchEntries, ::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Google::Cloud::Dataplex::V1::SearchEntriesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb new file mode 100644 index 000000000000..972edf974184 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/content.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/analyze_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n&google/cloud/dataplex/v1/content.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/analyze.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa1\x01\n\x14\x43reateContentRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x37\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.google.cloud.dataplex.v1.ContentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xa1\x01\n\x14UpdateContentRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x37\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.google.cloud.dataplex.v1.ContentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"M\n\x14\x44\x65leteContentRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Content\"\x90\x01\n\x12ListContentRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"b\n\x13ListContentResponse\x12\x32\n\x07\x63ontent\x18\x01 \x03(\x0b\x32!.google.cloud.dataplex.v1.Content\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd8\x01\n\x11GetContentRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Content\x12J\n\x04view\x18\x02 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.GetContentRequest.ContentViewB\x03\xe0\x41\x01\"@\n\x0b\x43ontentView\x12\x1c\n\x18\x43ONTENT_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x32\xad\x10\n\x0e\x43ontentService\x12\x80\x02\n\rCreateContent\x12..google.cloud.dataplex.v1.CreateContentRequest\x1a!.google.cloud.dataplex.v1.Content\"\x9b\x01\xda\x41\x0eparent,content\x82\xd3\xe4\x93\x02\x83\x01\"8/v1/{parent=projects/*/locations/*/lakes/*}/contentitems:\x07\x63ontentZ>\"3/v1/{parent=projects/*/locations/*/lakes/*}/content:\x07\x63ontent\x12\x97\x02\n\rUpdateContent\x12..google.cloud.dataplex.v1.UpdateContentRequest\x1a!.google.cloud.dataplex.v1.Content\"\xb2\x01\xda\x41\x13\x63ontent,update_mask\x82\xd3\xe4\x93\x02\x95\x01\x32\x41/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}:\x07\x63ontentZG2 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a content. Only supports full resource update. + # + # @overload update_content(request, options = nil) + # Pass arguments to `update_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_content(update_mask: nil, content: nil, validate_only: nil) + # Pass arguments to `update_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new + # + # # Call the update_content method. + # result = client.update_content request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Content. + # p result + # + def update_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.content&.name + header_params["content.name"] = request.content.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_content.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.call_rpc :update_content, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a content. + # + # @overload delete_content(request, options = nil) + # Pass arguments to `delete_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_content(name: nil) + # Pass arguments to `delete_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the content: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new + # + # # Call the delete_content method. + # result = client.delete_content request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_content.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.call_rpc :delete_content, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a content resource. + # + # @overload get_content(request, options = nil) + # Pass arguments to `get_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_content(name: nil, view: nil) + # Pass arguments to `get_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the content: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + # @param view [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView] + # Optional. Specify content view to make a partial request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetContentRequest.new + # + # # Call the get_content method. + # result = client.get_content request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Content. + # p result + # + def get_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_content.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.call_rpc :get_content, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # 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). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List content. + # + # @overload list_content(request, options = nil) + # Pass arguments to `list_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_content(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListContentRequest.new + # + # # Call the list_content method. + # result = client.list_content request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Content. + # p item + # end + # + def list_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_content.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.call_rpc :list_content, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @content_service_stub, :list_content, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ContentService API. + # + # This class represents the configuration for ContentService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_content to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::ContentService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_content.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_content.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ContentService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_content` + # @return [::Gapic::Config::Method] + # + attr_reader :create_content + ## + # RPC-specific configuration for `update_content` + # @return [::Gapic::Config::Method] + # + attr_reader :update_content + ## + # RPC-specific configuration for `delete_content` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_content + ## + # RPC-specific configuration for `get_content` + # @return [::Gapic::Config::Method] + # + attr_reader :get_content + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `list_content` + # @return [::Gapic::Config::Method] + # + attr_reader :list_content + + # @private + def initialize parent_rpcs = nil + create_content_config = parent_rpcs.create_content if parent_rpcs.respond_to? :create_content + @create_content = ::Gapic::Config::Method.new create_content_config + update_content_config = parent_rpcs.update_content if parent_rpcs.respond_to? :update_content + @update_content = ::Gapic::Config::Method.new update_content_config + delete_content_config = parent_rpcs.delete_content if parent_rpcs.respond_to? :delete_content + @delete_content = ::Gapic::Config::Method.new delete_content_config + get_content_config = parent_rpcs.get_content if parent_rpcs.respond_to? :get_content + @get_content = ::Gapic::Config::Method.new get_content_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + list_content_config = parent_rpcs.list_content if parent_rpcs.respond_to? :list_content + @list_content = ::Gapic::Config::Method.new list_content_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb new file mode 100644 index 000000000000..19e1ffcd0c88 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module ContentService + # Credentials for the ContentService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb new file mode 100644 index 000000000000..57ef53d237e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + module ContentService + # Path helper methods for the ContentService API. + module Paths + ## + # Create a fully-qualified Content resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/content/{content}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param content [String] + # + # @return [::String] + def content_path project:, location:, lake:, content: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/content/#{content}" + end + + ## + # Create a fully-qualified Lake resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # + # @return [::String] + def lake_path project:, location:, lake: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb new file mode 100644 index 000000000000..42bc1424d9a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/content_service/credentials" +require "google/cloud/dataplex/v1/content_service/paths" +require "google/cloud/dataplex/v1/content_service/rest/client" + +module Google + module Cloud + module Dataplex + module V1 + ## + # ContentService manages Notebook and SQL Scripts for Dataplex. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/content_service/rest" + # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + module ContentService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/content_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb new file mode 100644 index 000000000000..d02359ca50f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb @@ -0,0 +1,1131 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/content_pb" +require "google/cloud/dataplex/v1/content_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module ContentService + module Rest + ## + # REST client for the ContentService service. + # + # ContentService manages Notebook and SQL Scripts for Dataplex. + # + class Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :content_service_stub + + ## + # Configure the ContentService Client class. + # + # See {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ContentService clients + # ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_content.timeout = 60.0 + + default_config.rpcs.update_content.timeout = 60.0 + + default_config.rpcs.delete_content.timeout = 60.0 + + default_config.rpcs.get_content.timeout = 60.0 + default_config.rpcs.get_content.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_iam_policy.timeout = 60.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.set_iam_policy.timeout = 60.0 + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_content.timeout = 60.0 + default_config.rpcs.list_content.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ContentService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @content_service_stub.universe_domain + end + + ## + # Create a new ContentService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ContentService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @content_service_stub = ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @content_service_stub.endpoint + config.universe_domain = @content_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @content_service_stub.endpoint + config.universe_domain = @content_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Create a content. + # + # @overload create_content(request, options = nil) + # Pass arguments to `create_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_content(parent: nil, content: nil, validate_only: nil) + # Pass arguments to `create_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} + # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] + # Required. Content resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateContentRequest.new + # + # # Call the create_content method. + # result = client.create_content request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Content. + # p result + # + def create_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_content.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.create_content request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a content. Only supports full resource update. + # + # @overload update_content(request, options = nil) + # Pass arguments to `update_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_content(update_mask: nil, content: nil, validate_only: nil) + # Pass arguments to `update_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new + # + # # Call the update_content method. + # result = client.update_content request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Content. + # p result + # + def update_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_content.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.update_content request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a content. + # + # @overload delete_content(request, options = nil) + # Pass arguments to `delete_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_content(name: nil) + # Pass arguments to `delete_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the content: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new + # + # # Call the delete_content method. + # result = client.delete_content request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_content.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.delete_content request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a content resource. + # + # @overload get_content(request, options = nil) + # Pass arguments to `get_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_content(name: nil, view: nil) + # Pass arguments to `get_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the content: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + # @param view [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView] + # Optional. Specify content view to make a partial request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetContentRequest.new + # + # # Call the get_content method. + # result = client.get_content request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Content. + # p result + # + def get_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_content.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.get_content request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # 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). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List content. + # + # @overload list_content(request, options = nil) + # Pass arguments to `list_content` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListContentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListContentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_content(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_content` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListContentRequest.new + # + # # Call the list_content method. + # result = client.list_content request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Content. + # p item + # end + # + def list_content request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListContentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_content.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_content.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_content.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_service_stub.list_content request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @content_service_stub, :list_content, "content", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ContentService REST API. + # + # This class represents the configuration for ContentService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_content to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_content.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_content.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ContentService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_content` + # @return [::Gapic::Config::Method] + # + attr_reader :create_content + ## + # RPC-specific configuration for `update_content` + # @return [::Gapic::Config::Method] + # + attr_reader :update_content + ## + # RPC-specific configuration for `delete_content` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_content + ## + # RPC-specific configuration for `get_content` + # @return [::Gapic::Config::Method] + # + attr_reader :get_content + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `list_content` + # @return [::Gapic::Config::Method] + # + attr_reader :list_content + + # @private + def initialize parent_rpcs = nil + create_content_config = parent_rpcs.create_content if parent_rpcs.respond_to? :create_content + @create_content = ::Gapic::Config::Method.new create_content_config + update_content_config = parent_rpcs.update_content if parent_rpcs.respond_to? :update_content + @update_content = ::Gapic::Config::Method.new update_content_config + delete_content_config = parent_rpcs.delete_content if parent_rpcs.respond_to? :delete_content + @delete_content = ::Gapic::Config::Method.new delete_content_config + get_content_config = parent_rpcs.get_content if parent_rpcs.respond_to? :get_content + @get_content = ::Gapic::Config::Method.new get_content_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + list_content_config = parent_rpcs.list_content if parent_rpcs.respond_to? :list_content + @list_content = ::Gapic::Config::Method.new list_content_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb new file mode 100644 index 000000000000..4ea2e6fdf50e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb @@ -0,0 +1,605 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/content_pb" + +module Google + module Cloud + module Dataplex + module V1 + module ContentService + module Rest + ## + # REST service stub for the ContentService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the create_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateContentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # A result object deserialized from the server's reply + def create_content request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_content_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateContentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # A result object deserialized from the server's reply + def update_content request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_content_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteContentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_content request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_content_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetContentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Content] + # A result object deserialized from the server's reply + def get_content request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_content_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListContentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListContentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListContentResponse] + # A result object deserialized from the server's reply + def list_content request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_content_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListContentResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the create_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateContentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_content_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/contentitems", + body: "content", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/content", + body: "content", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateContentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_content_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{content.name}", + body: "content", + matches: [ + ["content.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{content.name}", + body: "content", + matches: [ + ["content.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteContentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_content_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetContentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_content_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_content REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListContentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_content_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/contentitems", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/content", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb new file mode 100644 index 000000000000..92e8895fbc5a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb @@ -0,0 +1,77 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/content.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# + +require 'grpc' +require 'google/cloud/dataplex/v1/content_pb' + +module Google + module Cloud + module Dataplex + module V1 + module ContentService + # ContentService manages Notebook and SQL Scripts for Dataplex. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.ContentService' + + # Create a content. + rpc :CreateContent, ::Google::Cloud::Dataplex::V1::CreateContentRequest, ::Google::Cloud::Dataplex::V1::Content + # Update a content. Only supports full resource update. + rpc :UpdateContent, ::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Google::Cloud::Dataplex::V1::Content + # Delete a content. + rpc :DeleteContent, ::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Google::Protobuf::Empty + # Get a content resource. + rpc :GetContent, ::Google::Cloud::Dataplex::V1::GetContentRequest, ::Google::Cloud::Dataplex::V1::Content + # 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, ::Google::Iam::V1::Policy + # 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, ::Google::Iam::V1::Policy + # 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, ::Google::Iam::V1::TestIamPermissionsResponse + # List content. + rpc :ListContent, ::Google::Cloud::Dataplex::V1::ListContentRequest, ::Google::Cloud::Dataplex::V1::ListContentResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb new file mode 100644 index 000000000000..81faee451353 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/data_profile.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/dataplex/v1/processing_pb' + + +descriptor_data = "\n+google/cloud/dataplex/v1/data_profile.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a)google/cloud/dataplex/v1/processing.proto\"\xa8\x04\n\x0f\x44\x61taProfileSpec\x12\x1d\n\x10sampling_percent\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x12\x17\n\nrow_filter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12Y\n\x11post_scan_actions\x18\x04 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataProfileSpec.PostScanActionsB\x03\xe0\x41\x01\x12U\n\x0einclude_fields\x18\x05 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsB\x03\xe0\x41\x01\x12U\n\x0e\x65xclude_fields\x18\x06 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsB\x03\xe0\x41\x01\x1a\xa7\x01\n\x0fPostScanActions\x12\x66\n\x0f\x62igquery_export\x18\x01 \x01(\x0b\x32H.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExportB\x03\xe0\x41\x01\x1a,\n\x0e\x42igQueryExport\x12\x1a\n\rresults_table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a*\n\x0eSelectedFields\x12\x18\n\x0b\x66ield_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\xe4\r\n\x11\x44\x61taProfileResult\x12\x11\n\trow_count\x18\x03 \x01(\x03\x12\x44\n\x07profile\x18\x04 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.DataProfileResult.Profile\x12;\n\x0cscanned_data\x18\x05 \x01(\x0b\x32%.google.cloud.dataplex.v1.ScannedData\x12h\n\x18post_scan_actions_result\x18\x06 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResultB\x03\xe0\x41\x03\x1a\xce\x08\n\x07Profile\x12I\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x39.google.cloud.dataplex.v1.DataProfileResult.Profile.Field\x1a\xf7\x07\n\x05\x46ield\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0c\n\x04mode\x18\x03 \x01(\t\x12V\n\x07profile\x18\x04 \x01(\x0b\x32\x45.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo\x1a\xeb\x06\n\x0bProfileInfo\x12\x12\n\nnull_ratio\x18\x02 \x01(\x01\x12\x16\n\x0e\x64istinct_ratio\x18\x03 \x01(\x01\x12\x65\n\x0ctop_n_values\x18\x04 \x03(\x0b\x32O.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue\x12o\n\x0estring_profile\x18\x65 \x01(\x0b\x32U.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfoH\x00\x12q\n\x0finteger_profile\x18\x66 \x01(\x0b\x32V.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfoH\x00\x12o\n\x0e\x64ouble_profile\x18g \x01(\x0b\x32U.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfoH\x00\x1aQ\n\x0fStringFieldInfo\x12\x12\n\nmin_length\x18\x01 \x01(\x03\x12\x12\n\nmax_length\x18\x02 \x01(\x03\x12\x16\n\x0e\x61verage_length\x18\x03 \x01(\x01\x1al\n\x10IntegerFieldInfo\x12\x0f\n\x07\x61verage\x18\x01 \x01(\x01\x12\x1a\n\x12standard_deviation\x18\x03 \x01(\x01\x12\x0b\n\x03min\x18\x04 \x01(\x03\x12\x11\n\tquartiles\x18\x06 \x03(\x03\x12\x0b\n\x03max\x18\x05 \x01(\x03\x1ak\n\x0f\x44oubleFieldInfo\x12\x0f\n\x07\x61verage\x18\x01 \x01(\x01\x12\x1a\n\x12standard_deviation\x18\x03 \x01(\x01\x12\x0b\n\x03min\x18\x04 \x01(\x01\x12\x11\n\tquartiles\x18\x06 \x03(\x01\x12\x0b\n\x03max\x18\x05 \x01(\x01\x1a\x38\n\tTopNValue\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x12\r\n\x05ratio\x18\x03 \x01(\x01\x42\x0c\n\nfield_info\x1a\xfd\x02\n\x15PostScanActionsResult\x12{\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32V.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResultB\x03\xe0\x41\x03\x1a\xe6\x01\n\x14\x42igQueryExportResult\x12p\n\x05state\x18\x01 \x01(\x0e\x32\\.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.StateB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\x42l\n\x1c\x63om.google.cloud.dataplex.v1B\x10\x44\x61taProfileProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.dataplex.v1.ScannedData", "google/cloud/dataplex/v1/processing.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + DataProfileSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec").msgclass + DataProfileSpec::PostScanActions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.PostScanActions").msgclass + DataProfileSpec::PostScanActions::BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport").msgclass + DataProfileSpec::SelectedFields = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.SelectedFields").msgclass + DataProfileResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult").msgclass + DataProfileResult::Profile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile").msgclass + DataProfileResult::Profile::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field").msgclass + DataProfileResult::Profile::Field::ProfileInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo").msgclass + DataProfileResult::Profile::Field::ProfileInfo::StringFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo").msgclass + DataProfileResult::Profile::Field::ProfileInfo::IntegerFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo").msgclass + DataProfileResult::Profile::Field::ProfileInfo::DoubleFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo").msgclass + DataProfileResult::Profile::Field::ProfileInfo::TopNValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue").msgclass + DataProfileResult::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult").msgclass + DataProfileResult::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult").msgclass + DataProfileResult::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb new file mode 100644 index 000000000000..57d9d4786491 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/data_quality.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/processing_pb' + + +descriptor_data = "\n+google/cloud/dataplex/v1/data_quality.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/dataplex/v1/processing.proto\"\xc0\x08\n\x0f\x44\x61taQualitySpec\x12=\n\x05rules\x18\x01 \x03(\x0b\x32).google.cloud.dataplex.v1.DataQualityRuleB\x03\xe0\x41\x02\x12\x1d\n\x10sampling_percent\x18\x04 \x01(\x02\x42\x03\xe0\x41\x01\x12\x17\n\nrow_filter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12Y\n\x11post_scan_actions\x18\x06 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataQualitySpec.PostScanActionsB\x03\xe0\x41\x01\x1a\xda\x06\n\x0fPostScanActions\x12\x66\n\x0f\x62igquery_export\x18\x01 \x01(\x0b\x32H.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExportB\x03\xe0\x41\x01\x12n\n\x13notification_report\x18\x02 \x01(\x0b\x32L.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReportB\x03\xe0\x41\x01\x1a,\n\x0e\x42igQueryExport\x12\x1a\n\rresults_table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a!\n\nRecipients\x12\x13\n\x06\x65mails\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a\x35\n\x15ScoreThresholdTrigger\x12\x1c\n\x0fscore_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x1a\x13\n\x11JobFailureTrigger\x1a\x0f\n\rJobEndTrigger\x1a\xc0\x03\n\x12NotificationReport\x12]\n\nrecipients\x18\x01 \x01(\x0b\x32\x44.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.RecipientsB\x03\xe0\x41\x02\x12u\n\x17score_threshold_trigger\x18\x02 \x01(\x0b\x32O.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTriggerB\x03\xe0\x41\x01\x12m\n\x13job_failure_trigger\x18\x04 \x01(\x0b\x32K.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTriggerB\x03\xe0\x41\x01\x12\x65\n\x0fjob_end_trigger\x18\x05 \x01(\x0b\x32G.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTriggerB\x03\xe0\x41\x01\"\xd3\x06\n\x11\x44\x61taQualityResult\x12\x0e\n\x06passed\x18\x05 \x01(\x08\x12\x17\n\x05score\x18\t \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12H\n\ndimensions\x18\x02 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.DataQualityDimensionResult\x12G\n\x07\x63olumns\x18\n \x03(\x0b\x32\x31.google.cloud.dataplex.v1.DataQualityColumnResultB\x03\xe0\x41\x03\x12>\n\x05rules\x18\x03 \x03(\x0b\x32/.google.cloud.dataplex.v1.DataQualityRuleResult\x12\x11\n\trow_count\x18\x04 \x01(\x03\x12;\n\x0cscanned_data\x18\x07 \x01(\x0b\x32%.google.cloud.dataplex.v1.ScannedData\x12h\n\x18post_scan_actions_result\x18\x08 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultB\x03\xe0\x41\x03\x1a\xfd\x02\n\x15PostScanActionsResult\x12{\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32V.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResultB\x03\xe0\x41\x03\x1a\xe6\x01\n\x14\x42igQueryExportResult\x12p\n\x05state\x18\x01 \x01(\x0e\x32\\.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.StateB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\x42\x08\n\x06_score\"\xf5\x01\n\x15\x44\x61taQualityRuleResult\x12\x37\n\x04rule\x18\x01 \x01(\x0b\x32).google.cloud.dataplex.v1.DataQualityRule\x12\x0e\n\x06passed\x18\x07 \x01(\x08\x12\x17\n\x0f\x65valuated_count\x18\t \x01(\x03\x12\x14\n\x0cpassed_count\x18\x08 \x01(\x03\x12\x12\n\nnull_count\x18\x05 \x01(\x03\x12\x12\n\npass_ratio\x18\x06 \x01(\x01\x12\x1a\n\x12\x66\x61iling_rows_query\x18\n \x01(\t\x12 \n\x13\x61ssertion_row_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\"\x97\x01\n\x1a\x44\x61taQualityDimensionResult\x12\x46\n\tdimension\x18\x01 \x01(\x0b\x32..google.cloud.dataplex.v1.DataQualityDimensionB\x03\xe0\x41\x03\x12\x0e\n\x06passed\x18\x03 \x01(\x08\x12\x17\n\x05score\x18\x04 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x08\n\x06_score\"$\n\x14\x44\x61taQualityDimension\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xf4\r\n\x0f\x44\x61taQualityRule\x12W\n\x11range_expectation\x18\x01 \x01(\x0b\x32:.google.cloud.dataplex.v1.DataQualityRule.RangeExpectationH\x00\x12\\\n\x14non_null_expectation\x18\x02 \x01(\x0b\x32<.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectationH\x00\x12S\n\x0fset_expectation\x18\x03 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataQualityRule.SetExpectationH\x00\x12W\n\x11regex_expectation\x18\x04 \x01(\x0b\x32:.google.cloud.dataplex.v1.DataQualityRule.RegexExpectationH\x00\x12\x61\n\x16uniqueness_expectation\x18\x64 \x01(\x0b\x32?.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectationH\x00\x12j\n\x1bstatistic_range_expectation\x18\x65 \x01(\x0b\x32\x43.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectationH\x00\x12g\n\x19row_condition_expectation\x18\xc8\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectationH\x00\x12k\n\x1btable_condition_expectation\x18\xc9\x01 \x01(\x0b\x32\x43.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectationH\x00\x12P\n\rsql_assertion\x18\xca\x01 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DataQualityRule.SqlAssertionH\x00\x12\x14\n\x06\x63olumn\x18\xf4\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0bignore_null\x18\xf5\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x17\n\tdimension\x18\xf6\x03 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\tthreshold\x18\xf7\x03 \x01(\x01\x42\x03\xe0\x41\x01\x12\x12\n\x04name\x18\xf8\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0b\x64\x65scription\x18\xf9\x03 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x01\n\x10RangeExpectation\x12\x16\n\tmin_value\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tmax_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12strict_min_enabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12strict_max_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x14\n\x12NonNullExpectation\x1a%\n\x0eSetExpectation\x12\x13\n\x06values\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a&\n\x10RegexExpectation\x12\x12\n\x05regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x17\n\x15UniquenessExpectation\x1a\xc2\x02\n\x19StatisticRangeExpectation\x12k\n\tstatistic\x18\x01 \x01(\x0e\x32S.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatisticB\x03\xe0\x41\x01\x12\x16\n\tmin_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tmax_value\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12strict_min_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12strict_max_enabled\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"F\n\x0f\x43olumnStatistic\x12\x17\n\x13STATISTIC_UNDEFINED\x10\x00\x12\x08\n\x04MEAN\x10\x01\x12\x07\n\x03MIN\x10\x02\x12\x07\n\x03MAX\x10\x03\x1a\x36\n\x17RowConditionExpectation\x12\x1b\n\x0esql_expression\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x38\n\x19TableConditionExpectation\x12\x1b\n\x0esql_expression\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a*\n\x0cSqlAssertion\x12\x1a\n\rsql_statement\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x0b\n\trule_type\"Q\n\x17\x44\x61taQualityColumnResult\x12\x13\n\x06\x63olumn\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\x05score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x08\n\x06_scoreB\xc4\x01\n\x1c\x63om.google.cloud.dataplex.v1B\x10\x44\x61taQualityProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.dataplex.v1.ScannedData", "google/cloud/dataplex/v1/processing.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + DataQualitySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec").msgclass + DataQualitySpec::PostScanActions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions").msgclass + DataQualitySpec::PostScanActions::BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport").msgclass + DataQualitySpec::PostScanActions::Recipients = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients").msgclass + DataQualitySpec::PostScanActions::ScoreThresholdTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger").msgclass + DataQualitySpec::PostScanActions::JobFailureTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger").msgclass + DataQualitySpec::PostScanActions::JobEndTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger").msgclass + DataQualitySpec::PostScanActions::NotificationReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport").msgclass + DataQualityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult").msgclass + DataQualityResult::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult").msgclass + DataQualityResult::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult").msgclass + DataQualityResult::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State").enummodule + DataQualityRuleResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRuleResult").msgclass + DataQualityDimensionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityDimensionResult").msgclass + DataQualityDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityDimension").msgclass + DataQualityRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule").msgclass + DataQualityRule::RangeExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RangeExpectation").msgclass + DataQualityRule::NonNullExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation").msgclass + DataQualityRule::SetExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.SetExpectation").msgclass + DataQualityRule::RegexExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RegexExpectation").msgclass + DataQualityRule::UniquenessExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation").msgclass + DataQualityRule::StatisticRangeExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation").msgclass + DataQualityRule::StatisticRangeExpectation::ColumnStatistic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic").enummodule + DataQualityRule::RowConditionExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation").msgclass + DataQualityRule::TableConditionExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation").msgclass + DataQualityRule::SqlAssertion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.SqlAssertion").msgclass + DataQualityColumnResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityColumnResult").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb new file mode 100644 index 000000000000..9563fe840d55 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +require "google/cloud/dataplex/v1/data_scan_service/credentials" +require "google/cloud/dataplex/v1/data_scan_service/paths" +require "google/cloud/dataplex/v1/data_scan_service/operations" +require "google/cloud/dataplex/v1/data_scan_service/client" +require "google/cloud/dataplex/v1/data_scan_service/rest" + +module Google + module Cloud + module Dataplex + module 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. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/data_scan_service" + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dataplex/v1/data_scan_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + module DataScanService + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_scan_service", "helpers.rb" +require "google/cloud/dataplex/v1/data_scan_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb new file mode 100644 index 000000000000..eceda72aff4a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb @@ -0,0 +1,1329 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/datascans_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + ## + # Client for the DataScanService service. + # + # 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 Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_scan_service_stub + + ## + # Configure the DataScanService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataScanService clients + # ::Google::Cloud::Dataplex::V1::DataScanService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataScanService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_scan_service_stub.universe_domain + end + + ## + # Create a new DataScanService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataScanService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/datascans_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @data_scan_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::DataScanService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_scan_service_stub.endpoint + config.universe_domain = @data_scan_service_stub.universe_domain + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_scan_service_stub.endpoint + config.universe_domain = @data_scan_service_stub.universe_domain + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataScanService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Creates a DataScan resource. + # + # @overload create_data_scan(request, options = nil) + # Pass arguments to `create_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_scan(parent: nil, data_scan: nil, data_scan_id: nil, validate_only: nil) + # Pass arguments to `create_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] + # Required. DataScan resource. + # @param data_scan_id [::String] + # 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 validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new + # + # # Call the create_data_scan method. + # result = client.create_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :create_data_scan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataScan resource. + # + # @overload update_data_scan(request, options = nil) + # Pass arguments to `update_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_scan(data_scan: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] + # Required. DataScan resource to be updated. + # + # Only fields specified in `update_mask` are updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new + # + # # Call the update_data_scan method. + # result = client.update_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_scan&.name + header_params["data_scan.name"] = request.data_scan.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :update_data_scan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataScan resource. + # + # @overload delete_data_scan(request, options = nil) + # Pass arguments to `delete_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_scan(name: nil) + # Pass arguments to `delete_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new + # + # # Call the delete_data_scan method. + # result = client.delete_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :delete_data_scan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a DataScan resource. + # + # @overload get_data_scan(request, options = nil) + # Pass arguments to `get_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_scan(name: nil, view: nil) + # Pass arguments to `get_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] + # Optional. Select the DataScan view to return. Defaults to `BASIC`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataScan] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new + # + # # Call the get_data_scan method. + # result = client.get_data_scan request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. + # p result + # + def get_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :get_data_scan, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataScans. + # + # @overload list_data_scans(request, options = nil) + # Pass arguments to `list_data_scans` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataScansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_scans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_scans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new + # + # # Call the list_data_scans method. + # result = client.list_data_scans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. + # p item + # end + # + def list_data_scans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScansRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_scans.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_scans.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_scans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :list_data_scans, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scans, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Runs an on-demand execution of a DataScan + # + # @overload run_data_scan(request, options = nil) + # Pass arguments to `run_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::RunDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_data_scan(name: nil) + # Pass arguments to `run_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new + # + # # Call the run_data_scan method. + # result = client.run_data_scan request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. + # p result + # + def run_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_data_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :run_data_scan, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a DataScanJob resource. + # + # @overload get_data_scan_job(request, options = nil) + # Pass arguments to `get_data_scan_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataScanJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_scan_job(name: nil, view: nil) + # Pass arguments to `get_data_scan_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] + # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataScanJob] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScanJob] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new + # + # # Call the get_data_scan_job method. + # result = client.get_data_scan_job request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. + # p result + # + def get_data_scan_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_scan_job.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_scan_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_scan_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :get_data_scan_job, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataScanJobs under the given DataScan. + # + # @overload list_data_scan_jobs(request, options = nil) + # Pass arguments to `list_data_scan_jobs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_scan_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_scan_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new + # + # # Call the list_data_scan_jobs method. + # result = client.list_data_scan_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. + # p item + # end + # + def list_data_scan_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_scan_jobs.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_scan_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_scan_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :list_data_scan_jobs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Generates recommended DataQualityRule from a data profiling DataScan. + # + # @overload generate_data_quality_rules(request, options = nil) + # Pass arguments to `generate_data_quality_rules` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_data_quality_rules(name: nil) + # Pass arguments to `generate_data_quality_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name should be either + # * the name of a datascan with at least one successful completed data + # profiling job, or + # * the name of a successful completed data profiling datascan job. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new + # + # # Call the generate_data_quality_rules method. + # result = client.generate_data_quality_rules request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. + # p result + # + def generate_data_quality_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_data_quality_rules.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_data_quality_rules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_data_quality_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :generate_data_quality_rules, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataScanService API. + # + # This class represents the configuration for DataScanService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_scan to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataScanService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_scan.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_scan.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the DataScanService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_scan + ## + # RPC-specific configuration for `update_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_scan + ## + # RPC-specific configuration for `delete_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_scan + ## + # RPC-specific configuration for `get_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_scan + ## + # RPC-specific configuration for `list_data_scans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_scans + ## + # RPC-specific configuration for `run_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :run_data_scan + ## + # RPC-specific configuration for `get_data_scan_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_scan_job + ## + # RPC-specific configuration for `list_data_scan_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_scan_jobs + ## + # RPC-specific configuration for `generate_data_quality_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_data_quality_rules + + # @private + def initialize parent_rpcs = nil + create_data_scan_config = parent_rpcs.create_data_scan if parent_rpcs.respond_to? :create_data_scan + @create_data_scan = ::Gapic::Config::Method.new create_data_scan_config + update_data_scan_config = parent_rpcs.update_data_scan if parent_rpcs.respond_to? :update_data_scan + @update_data_scan = ::Gapic::Config::Method.new update_data_scan_config + delete_data_scan_config = parent_rpcs.delete_data_scan if parent_rpcs.respond_to? :delete_data_scan + @delete_data_scan = ::Gapic::Config::Method.new delete_data_scan_config + get_data_scan_config = parent_rpcs.get_data_scan if parent_rpcs.respond_to? :get_data_scan + @get_data_scan = ::Gapic::Config::Method.new get_data_scan_config + list_data_scans_config = parent_rpcs.list_data_scans if parent_rpcs.respond_to? :list_data_scans + @list_data_scans = ::Gapic::Config::Method.new list_data_scans_config + run_data_scan_config = parent_rpcs.run_data_scan if parent_rpcs.respond_to? :run_data_scan + @run_data_scan = ::Gapic::Config::Method.new run_data_scan_config + get_data_scan_job_config = parent_rpcs.get_data_scan_job if parent_rpcs.respond_to? :get_data_scan_job + @get_data_scan_job = ::Gapic::Config::Method.new get_data_scan_job_config + list_data_scan_jobs_config = parent_rpcs.list_data_scan_jobs if parent_rpcs.respond_to? :list_data_scan_jobs + @list_data_scan_jobs = ::Gapic::Config::Method.new list_data_scan_jobs_config + generate_data_quality_rules_config = parent_rpcs.generate_data_quality_rules if parent_rpcs.respond_to? :generate_data_quality_rules + @generate_data_quality_rules = ::Gapic::Config::Method.new generate_data_quality_rules_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb new file mode 100644 index 000000000000..51307cec4524 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + # Credentials for the DataScanService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb new file mode 100644 index 000000000000..6d49b74e9b13 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb @@ -0,0 +1,801 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataScanService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataScanService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb new file mode 100644 index 000000000000..1ba91d70b8d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb @@ -0,0 +1,113 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + # Path helper methods for the DataScanService API. + module Paths + ## + # Create a fully-qualified DataScan resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataScans/{dataScan}` + # + # @param project [String] + # @param location [String] + # @param dataScan [String] + # + # @return [::String] + def data_scan_path project:, location:, dataScan: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataScans/#{dataScan}" + end + + ## + # Create a fully-qualified DataScanJob resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}` + # + # @param project [String] + # @param location [String] + # @param dataScan [String] + # @param job [String] + # + # @return [::String] + def data_scan_job_path project:, location:, dataScan:, job: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "dataScan cannot contain /" if dataScan.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataScans/#{dataScan}/jobs/#{job}" + end + + ## + # Create a fully-qualified Entity resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # @param entity [String] + # + # @return [::String] + def entity_path project:, location:, lake:, zone:, entity: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb new file mode 100644 index 000000000000..bf498ab0f46b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/data_scan_service/credentials" +require "google/cloud/dataplex/v1/data_scan_service/paths" +require "google/cloud/dataplex/v1/data_scan_service/rest/operations" +require "google/cloud/dataplex/v1/data_scan_service/rest/client" + +module Google + module Cloud + module Dataplex + module 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. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/data_scan_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + module DataScanService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/data_scan_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb new file mode 100644 index 000000000000..29318d468576 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb @@ -0,0 +1,1248 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/datascans_pb" +require "google/cloud/dataplex/v1/data_scan_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + module Rest + ## + # REST client for the DataScanService service. + # + # 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 Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_scan_service_stub + + ## + # Configure the DataScanService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataScanService clients + # ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataScanService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_scan_service_stub.universe_domain + end + + ## + # Create a new DataScanService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataScanService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @data_scan_service_stub = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_scan_service_stub.endpoint + config.universe_domain = @data_scan_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_scan_service_stub.endpoint + config.universe_domain = @data_scan_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataScanService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Creates a DataScan resource. + # + # @overload create_data_scan(request, options = nil) + # Pass arguments to `create_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_scan(parent: nil, data_scan: nil, data_scan_id: nil, validate_only: nil) + # Pass arguments to `create_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] + # Required. DataScan resource. + # @param data_scan_id [::String] + # 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 validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new + # + # # Call the create_data_scan method. + # result = client.create_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_data_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.create_data_scan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataScan resource. + # + # @overload update_data_scan(request, options = nil) + # Pass arguments to `update_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_scan(data_scan: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] + # Required. DataScan resource to be updated. + # + # Only fields specified in `update_mask` are updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new + # + # # Call the update_data_scan method. + # result = client.update_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.update_data_scan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataScan resource. + # + # @overload delete_data_scan(request, options = nil) + # Pass arguments to `delete_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_scan(name: nil) + # Pass arguments to `delete_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new + # + # # Call the delete_data_scan method. + # result = client.delete_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_data_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.delete_data_scan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a DataScan resource. + # + # @overload get_data_scan(request, options = nil) + # Pass arguments to `get_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_scan(name: nil, view: nil) + # Pass arguments to `get_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] + # Optional. Select the DataScan view to return. Defaults to `BASIC`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new + # + # # Call the get_data_scan method. + # result = client.get_data_scan request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. + # p result + # + def get_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.get_data_scan request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataScans. + # + # @overload list_data_scans(request, options = nil) + # Pass arguments to `list_data_scans` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataScansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_scans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_scans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScansResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataScansResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new + # + # # Call the list_data_scans method. + # result = client.list_data_scans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. + # p item + # end + # + def list_data_scans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScansRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_scans.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_scans.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_scans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.list_data_scans request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Runs an on-demand execution of a DataScan + # + # @overload run_data_scan(request, options = nil) + # Pass arguments to `run_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::RunDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_data_scan(name: nil) + # Pass arguments to `run_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new + # + # # Call the run_data_scan method. + # result = client.run_data_scan request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. + # p result + # + def run_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_data_scan.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.run_data_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.run_data_scan request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a DataScanJob resource. + # + # @overload get_data_scan_job(request, options = nil) + # Pass arguments to `get_data_scan_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataScanJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_scan_job(name: nil, view: nil) + # Pass arguments to `get_data_scan_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] + # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScanJob] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScanJob] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new + # + # # Call the get_data_scan_job method. + # result = client.get_data_scan_job request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. + # p result + # + def get_data_scan_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_scan_job.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_scan_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_scan_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.get_data_scan_job request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataScanJobs under the given DataScan. + # + # @overload list_data_scan_jobs(request, options = nil) + # Pass arguments to `list_data_scan_jobs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_scan_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_scan_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new + # + # # Call the list_data_scan_jobs method. + # result = client.list_data_scan_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. + # p item + # end + # + def list_data_scan_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_scan_jobs.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_scan_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_scan_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.list_data_scan_jobs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, "data_scan_jobs", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Generates recommended DataQualityRule from a data profiling DataScan. + # + # @overload generate_data_quality_rules(request, options = nil) + # Pass arguments to `generate_data_quality_rules` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload generate_data_quality_rules(name: nil) + # Pass arguments to `generate_data_quality_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name should be either + # * the name of a datascan with at least one successful completed data + # profiling job, or + # * the name of a successful completed data profiling datascan job. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new + # + # # Call the generate_data_quality_rules method. + # result = client.generate_data_quality_rules request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. + # p result + # + def generate_data_quality_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.generate_data_quality_rules.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.generate_data_quality_rules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_data_quality_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.generate_data_quality_rules request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataScanService REST API. + # + # This class represents the configuration for DataScanService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_scan to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_scan.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_scan.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the DataScanService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_scan + ## + # RPC-specific configuration for `update_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_scan + ## + # RPC-specific configuration for `delete_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_scan + ## + # RPC-specific configuration for `get_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_scan + ## + # RPC-specific configuration for `list_data_scans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_scans + ## + # RPC-specific configuration for `run_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :run_data_scan + ## + # RPC-specific configuration for `get_data_scan_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_scan_job + ## + # RPC-specific configuration for `list_data_scan_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_scan_jobs + ## + # RPC-specific configuration for `generate_data_quality_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_data_quality_rules + + # @private + def initialize parent_rpcs = nil + create_data_scan_config = parent_rpcs.create_data_scan if parent_rpcs.respond_to? :create_data_scan + @create_data_scan = ::Gapic::Config::Method.new create_data_scan_config + update_data_scan_config = parent_rpcs.update_data_scan if parent_rpcs.respond_to? :update_data_scan + @update_data_scan = ::Gapic::Config::Method.new update_data_scan_config + delete_data_scan_config = parent_rpcs.delete_data_scan if parent_rpcs.respond_to? :delete_data_scan + @delete_data_scan = ::Gapic::Config::Method.new delete_data_scan_config + get_data_scan_config = parent_rpcs.get_data_scan if parent_rpcs.respond_to? :get_data_scan + @get_data_scan = ::Gapic::Config::Method.new get_data_scan_config + list_data_scans_config = parent_rpcs.list_data_scans if parent_rpcs.respond_to? :list_data_scans + @list_data_scans = ::Gapic::Config::Method.new list_data_scans_config + run_data_scan_config = parent_rpcs.run_data_scan if parent_rpcs.respond_to? :run_data_scan + @run_data_scan = ::Gapic::Config::Method.new run_data_scan_config + get_data_scan_job_config = parent_rpcs.get_data_scan_job if parent_rpcs.respond_to? :get_data_scan_job + @get_data_scan_job = ::Gapic::Config::Method.new get_data_scan_job_config + list_data_scan_jobs_config = parent_rpcs.list_data_scan_jobs if parent_rpcs.respond_to? :list_data_scan_jobs + @list_data_scan_jobs = ::Gapic::Config::Method.new list_data_scan_jobs_config + generate_data_quality_rules_config = parent_rpcs.generate_data_quality_rules if parent_rpcs.respond_to? :generate_data_quality_rules + @generate_data_quality_rules = ::Gapic::Config::Method.new generate_data_quality_rules_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb new file mode 100644 index 000000000000..9c664a2eee4e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb @@ -0,0 +1,895 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataScanService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataScanService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb new file mode 100644 index 000000000000..2ff5a60c134c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb @@ -0,0 +1,612 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/datascans_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + module Rest + ## + # REST service stub for the DataScanService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the create_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # A result object deserialized from the server's reply + def get_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataScan.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_data_scans REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScansRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScansResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataScansResponse] + # A result object deserialized from the server's reply + def list_data_scans request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_scans_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the run_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::RunDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # A result object deserialized from the server's reply + def run_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_data_scan_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScanJob] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScanJob] + # A result object deserialized from the server's reply + def get_data_scan_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_scan_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataScanJob.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_data_scan_jobs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse] + # A result object deserialized from the server's reply + def list_data_scan_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_scan_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the generate_data_quality_rules REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # A result object deserialized from the server's reply + def generate_data_quality_rules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_data_quality_rules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataScans", + body: "data_scan", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_scan.name}", + body: "data_scan", + matches: [ + ["data_scan.name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_scans REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScansRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_scans_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataScans", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::RunDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:run", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_scan_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_scan_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_scan_jobs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_scan_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/jobs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_data_quality_rules REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_generate_data_quality_rules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:generateDataQualityRules", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:generateDataQualityRules", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb new file mode 100644 index 000000000000..6d32d95fb76b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/data_taxonomy.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/security_pb' +require 'google/cloud/dataplex/v1/service_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/cloud/dataplex/v1/data_taxonomy.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/dataplex/v1/security.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x04\n\x0c\x44\x61taTaxonomy\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12G\n\x06labels\x18\x08 \x03(\x0b\x32\x32.google.cloud.dataplex.v1.DataTaxonomy.LabelsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0f\x61ttribute_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\n \x01(\t\x12\x18\n\x0b\x63lass_count\x18\x0b \x01(\x05\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n$dataplex.googleapis.com/DataTaxonomy\x12Iprojects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}\"\x94\x06\n\rDataAttribute\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12H\n\x06labels\x18\x07 \x03(\x0b\x32\x33.google.cloud.dataplex.v1.DataAttribute.LabelsEntryB\x03\xe0\x41\x01\x12@\n\tparent_id\x18\x08 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12\x1c\n\x0f\x61ttribute_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\n \x01(\t\x12O\n\x14resource_access_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.ResourceAccessSpecB\x03\xe0\x41\x01\x12G\n\x10\x64\x61ta_access_spec\x18\x65 \x01(\x0b\x32(.google.cloud.dataplex.v1.DataAccessSpecB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x91\x01\xea\x41\x8d\x01\n%dataplex.googleapis.com/DataAttribute\x12\x64projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}\"\xc7\x06\n\x14\x44\x61taAttributeBinding\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x03\xfa\x41.\n,dataplex.googleapis.com/DataAttributeBinding\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12O\n\x06labels\x18\x07 \x03(\x0b\x32:.google.cloud.dataplex.v1.DataAttributeBinding.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12\x1a\n\x08resource\x18\x64 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x41\n\nattributes\x18n \x03(\tB-\xe0\x41\x01\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12G\n\x05paths\x18x \x03(\x0b\x32\x33.google.cloud.dataplex.v1.DataAttributeBinding.PathB\x03\xe0\x41\x01\x1a\\\n\x04Path\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\nattributes\x18\x02 \x03(\tB-\xe0\x41\x01\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8d\x01\xea\x41\x89\x01\n,dataplex.googleapis.com/DataAttributeBinding\x12Yprojects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}B\x14\n\x12resource_reference\"\xd5\x01\n\x19\x43reateDataTaxonomyRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1d\n\x10\x64\x61ta_taxonomy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\rdata_taxonomy\x18\x03 \x01(\x0b\x32&.google.cloud.dataplex.v1.DataTaxonomyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n\x19UpdateDataTaxonomyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x42\n\rdata_taxonomy\x18\x02 \x01(\x0b\x32&.google.cloud.dataplex.v1.DataTaxonomyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"T\n\x16GetDataTaxonomyRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\"\xb3\x01\n\x19ListDataTaxonomiesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x95\x01\n\x1aListDataTaxonomiesResponse\x12?\n\x0f\x64\x61ta_taxonomies\x18\x01 \x03(\x0b\x32&.google.cloud.dataplex.v1.DataTaxonomy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"j\n\x19\x44\x65leteDataTaxonomyRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xdc\x01\n\x1a\x43reateDataAttributeRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x1e\n\x11\x64\x61ta_attribute_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x0e\x64\x61ta_attribute\x18\x03 \x01(\x0b\x32\'.google.cloud.dataplex.v1.DataAttributeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xb4\x01\n\x1aUpdateDataAttributeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x44\n\x0e\x64\x61ta_attribute\x18\x02 \x01(\x0b\x32\'.google.cloud.dataplex.v1.DataAttributeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"V\n\x17GetDataAttributeRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\"\xb6\x01\n\x19ListDataAttributesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1aListDataAttributesResponse\x12@\n\x0f\x64\x61ta_attributes\x18\x01 \x03(\x0b\x32\'.google.cloud.dataplex.v1.DataAttribute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"l\n\x1a\x44\x65leteDataAttributeRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xf7\x01\n!CreateDataAttributeBindingRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12&\n\x19\x64\x61ta_attribute_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12S\n\x16\x64\x61ta_attribute_binding\x18\x03 \x01(\x0b\x32..google.cloud.dataplex.v1.DataAttributeBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xca\x01\n!UpdateDataAttributeBindingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12S\n\x16\x64\x61ta_attribute_binding\x18\x02 \x01(\x0b\x32..google.cloud.dataplex.v1.DataAttributeBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"d\n\x1eGetDataAttributeBindingRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,dataplex.googleapis.com/DataAttributeBinding\"\xba\x01\n ListDataAttributeBindingsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n!ListDataAttributeBindingsResponse\x12O\n\x17\x64\x61ta_attribute_bindings\x18\x01 \x03(\x0b\x32..google.cloud.dataplex.v1.DataAttributeBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"z\n!DeleteDataAttributeBindingRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,dataplex.googleapis.com/DataAttributeBinding\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\x32\x8b\x1d\n\x13\x44\x61taTaxonomyService\x12\x80\x02\n\x12\x43reateDataTaxonomy\x12\x33.google.cloud.dataplex.v1.CreateDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41!\n\x0c\x44\x61taTaxonomy\x12\x11OperationMetadata\xda\x41%parent,data_taxonomy,data_taxonomy_id\x82\xd3\xe4\x93\x02\x43\"2/v1/{parent=projects/*/locations/*}/dataTaxonomies:\rdata_taxonomy\x12\x82\x02\n\x12UpdateDataTaxonomy\x12\x33.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"\x97\x01\xca\x41!\n\x0c\x44\x61taTaxonomy\x12\x11OperationMetadata\xda\x41\x19\x64\x61ta_taxonomy,update_mask\x82\xd3\xe4\x93\x02Q2@/v1/{data_taxonomy.name=projects/*/locations/*/dataTaxonomies/*}:\rdata_taxonomy\x12\xd8\x01\n\x12\x44\x65leteDataTaxonomy\x12\x33.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/dataTaxonomies/*}\x12\xc4\x01\n\x12ListDataTaxonomies\x12\x33.google.cloud.dataplex.v1.ListDataTaxonomiesRequest\x1a\x34.google.cloud.dataplex.v1.ListDataTaxonomiesResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/dataTaxonomies\x12\xae\x01\n\x0fGetDataTaxonomy\x12\x30.google.cloud.dataplex.v1.GetDataTaxonomyRequest\x1a&.google.cloud.dataplex.v1.DataTaxonomy\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/dataTaxonomies/*}\x12\xba\x02\n\x1a\x43reateDataAttributeBinding\x12;.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41)\n\x14\x44\x61taAttributeBinding\x12\x11OperationMetadata\xda\x41\x37parent,data_attribute_binding,data_attribute_binding_id\x82\xd3\xe4\x93\x02S\"9/v1/{parent=projects/*/locations/*}/dataAttributeBindings:\x16\x64\x61ta_attribute_binding\x12\xbc\x02\n\x1aUpdateDataAttributeBinding\x12;.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41)\n\x14\x44\x61taAttributeBinding\x12\x11OperationMetadata\xda\x41\"data_attribute_binding,update_mask\x82\xd3\xe4\x93\x02j2P/v1/{data_attribute_binding.name=projects/*/locations/*/dataAttributeBindings/*}:\x16\x64\x61ta_attribute_binding\x12\xef\x01\n\x1a\x44\x65leteDataAttributeBinding\x12;.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/dataAttributeBindings/*}\x12\xe0\x01\n\x19ListDataAttributeBindings\x12:.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest\x1a;.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*}/dataAttributeBindings\x12\xcd\x01\n\x17GetDataAttributeBinding\x12\x38.google.cloud.dataplex.v1.GetDataAttributeBindingRequest\x1a..google.cloud.dataplex.v1.DataAttributeBinding\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/dataAttributeBindings/*}\x12\x93\x02\n\x13\x43reateDataAttribute\x12\x34.google.cloud.dataplex.v1.CreateDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41\"\n\rDataAttribute\x12\x11OperationMetadata\xda\x41\'parent,data_attribute,data_attribute_id\x82\xd3\xe4\x93\x02Q\"?/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes:\x0e\x64\x61ta_attribute\x12\x95\x02\n\x13UpdateDataAttribute\x12\x34.google.cloud.dataplex.v1.UpdateDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41\"\n\rDataAttribute\x12\x11OperationMetadata\xda\x41\x1a\x64\x61ta_attribute,update_mask\x82\xd3\xe4\x93\x02`2N/v1/{data_attribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}:\x0e\x64\x61ta_attribute\x12\xe7\x01\n\x13\x44\x65leteDataAttribute\x12\x34.google.cloud.dataplex.v1.DeleteDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}\x12\xd1\x01\n\x12ListDataAttributes\x12\x33.google.cloud.dataplex.v1.ListDataAttributesRequest\x1a\x34.google.cloud.dataplex.v1.ListDataAttributesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes\x12\xbe\x01\n\x10GetDataAttribute\x12\x31.google.cloud.dataplex.v1.GetDataAttributeRequest\x1a\'.google.cloud.dataplex.v1.DataAttribute\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBm\n\x1c\x63om.google.cloud.dataplex.v1B\x11\x44\x61taTaxonomyProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.dataplex.v1.ResourceAccessSpec", "google/cloud/dataplex/v1/security.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + DataTaxonomy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataTaxonomy").msgclass + DataAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttribute").msgclass + DataAttributeBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttributeBinding").msgclass + DataAttributeBinding::Path = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttributeBinding.Path").msgclass + CreateDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataTaxonomyRequest").msgclass + UpdateDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataTaxonomyRequest").msgclass + GetDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataTaxonomyRequest").msgclass + ListDataTaxonomiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataTaxonomiesRequest").msgclass + ListDataTaxonomiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataTaxonomiesResponse").msgclass + DeleteDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataTaxonomyRequest").msgclass + CreateDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataAttributeRequest").msgclass + UpdateDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataAttributeRequest").msgclass + GetDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataAttributeRequest").msgclass + ListDataAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributesRequest").msgclass + ListDataAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributesResponse").msgclass + DeleteDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataAttributeRequest").msgclass + CreateDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataAttributeBindingRequest").msgclass + UpdateDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest").msgclass + GetDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataAttributeBindingRequest").msgclass + ListDataAttributeBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributeBindingsRequest").msgclass + ListDataAttributeBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributeBindingsResponse").msgclass + DeleteDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb new file mode 100644 index 000000000000..12feb1928fc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +require "google/cloud/dataplex/v1/data_taxonomy_service/credentials" +require "google/cloud/dataplex/v1/data_taxonomy_service/paths" +require "google/cloud/dataplex/v1/data_taxonomy_service/operations" +require "google/cloud/dataplex/v1/data_taxonomy_service/client" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest" + +module Google + module Cloud + module Dataplex + module V1 + ## + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/data_taxonomy_service" + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dataplex/v1/data_taxonomy_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + module DataTaxonomyService + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_taxonomy_service", "helpers.rb" +require "google/cloud/dataplex/v1/data_taxonomy_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb new file mode 100644 index 000000000000..c516748b8f4e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb @@ -0,0 +1,1966 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/data_taxonomy_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + ## + # Client for the DataTaxonomyService service. + # + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + # + class Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_taxonomy_service_stub + + ## + # Configure the DataTaxonomyService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataTaxonomyService clients + # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTaxonomyService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_taxonomy_service_stub.universe_domain + end + + ## + # Create a new DataTaxonomyService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataTaxonomyService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/data_taxonomy_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @data_taxonomy_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_taxonomy_service_stub.endpoint + config.universe_domain = @data_taxonomy_service_stub.universe_domain + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_taxonomy_service_stub.endpoint + config.universe_domain = @data_taxonomy_service_stub.universe_domain + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Create a DataTaxonomy resource. + # + # @overload create_data_taxonomy(request, options = nil) + # Pass arguments to `create_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_taxonomy(parent: nil, data_taxonomy_id: nil, data_taxonomy: nil, validate_only: nil) + # Pass arguments to `create_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 data_taxonomy_id [::String] + # 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 data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] + # Required. DataTaxonomy resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new + # + # # Call the create_data_taxonomy method. + # result = client.create_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_taxonomy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :create_data_taxonomy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataTaxonomy resource. + # + # @overload update_data_taxonomy(request, options = nil) + # Pass arguments to `update_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_taxonomy(update_mask: nil, data_taxonomy: nil, validate_only: nil) + # Pass arguments to `update_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new + # + # # Call the update_data_taxonomy method. + # result = client.update_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_taxonomy&.name + header_params["data_taxonomy.name"] = request.data_taxonomy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_taxonomy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :update_data_taxonomy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy + # must be deleted before the DataTaxonomy can be deleted. + # + # @overload delete_data_taxonomy(request, options = nil) + # Pass arguments to `delete_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_taxonomy(name: nil, etag: nil) + # Pass arguments to `delete_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value,the DeleteDataTaxonomy method returns an ABORTED error. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new + # + # # Call the delete_data_taxonomy method. + # result = client.delete_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_taxonomy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :delete_data_taxonomy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataTaxonomy resources in a project and location. + # + # @overload list_data_taxonomies(request, options = nil) + # Pass arguments to `list_data_taxonomies` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_taxonomies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new + # + # # Call the list_data_taxonomies method. + # result = client.list_data_taxonomies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. + # p item + # end + # + def list_data_taxonomies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_taxonomies.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_taxonomies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_taxonomies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :list_data_taxonomies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_taxonomies, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a DataTaxonomy resource. + # + # @overload get_data_taxonomy(request, options = nil) + # Pass arguments to `get_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_taxonomy(name: nil) + # Pass arguments to `get_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new + # + # # Call the get_data_taxonomy method. + # result = client.get_data_taxonomy request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. + # p result + # + def get_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_taxonomy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :get_data_taxonomy, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a DataAttributeBinding resource. + # + # @overload create_data_attribute_binding(request, options = nil) + # Pass arguments to `create_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_attribute_binding(parent: nil, data_attribute_binding_id: nil, data_attribute_binding: nil, validate_only: nil) + # Pass arguments to `create_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id} + # @param data_attribute_binding_id [::String] + # 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 data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] + # Required. DataAttributeBinding resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new + # + # # Call the create_data_attribute_binding method. + # result = client.create_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_attribute_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :create_data_attribute_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataAttributeBinding resource. + # + # @overload update_data_attribute_binding(request, options = nil) + # Pass arguments to `update_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_attribute_binding(update_mask: nil, data_attribute_binding: nil, validate_only: nil) + # Pass arguments to `update_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new + # + # # Call the update_data_attribute_binding method. + # result = client.update_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_attribute_binding&.name + header_params["data_attribute_binding.name"] = request.data_attribute_binding.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_attribute_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :update_data_attribute_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataAttributeBinding resource. All attributes within the + # DataAttributeBinding must be deleted before the DataAttributeBinding can be + # deleted. + # + # @overload delete_data_attribute_binding(request, options = nil) + # Pass arguments to `delete_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_attribute_binding(name: nil, etag: nil) + # Pass arguments to `delete_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # @param etag [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new + # + # # Call the delete_data_attribute_binding method. + # result = client.delete_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_attribute_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :delete_data_attribute_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataAttributeBinding resources in a project and location. + # + # @overload list_data_attribute_bindings(request, options = nil) + # Pass arguments to `list_data_attribute_bindings` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_attribute_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_attribute_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the Location: + # projects/\\{project_number}/locations/\\{location_id} + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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 order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new + # + # # Call the list_data_attribute_bindings method. + # result = client.list_data_attribute_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. + # p item + # end + # + def list_data_attribute_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_attribute_bindings.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_attribute_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_attribute_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :list_data_attribute_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attribute_bindings, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a DataAttributeBinding resource. + # + # @overload get_data_attribute_binding(request, options = nil) + # Pass arguments to `get_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_attribute_binding(name: nil) + # Pass arguments to `get_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new + # + # # Call the get_data_attribute_binding method. + # result = client.get_data_attribute_binding request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. + # p result + # + def get_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_attribute_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :get_data_attribute_binding, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a DataAttribute resource. + # + # @overload create_data_attribute(request, options = nil) + # Pass arguments to `create_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_attribute(parent: nil, data_attribute_id: nil, data_attribute: nil, validate_only: nil) + # Pass arguments to `create_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param data_attribute_id [::String] + # 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 data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] + # Required. DataAttribute resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new + # + # # Call the create_data_attribute method. + # result = client.create_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_attribute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :create_data_attribute, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataAttribute resource. + # + # @overload update_data_attribute(request, options = nil) + # Pass arguments to `update_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_attribute(update_mask: nil, data_attribute: nil, validate_only: nil) + # Pass arguments to `update_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new + # + # # Call the update_data_attribute method. + # result = client.update_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_attribute&.name + header_params["data_attribute.name"] = request.data_attribute.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_attribute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :update_data_attribute, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Data Attribute resource. + # + # @overload delete_data_attribute(request, options = nil) + # Pass arguments to `delete_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_attribute(name: nil, etag: nil) + # Pass arguments to `delete_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteDataAttribute method returns an ABORTED error response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new + # + # # Call the delete_data_attribute method. + # result = client.delete_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_attribute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :delete_data_attribute, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Data Attribute resources in a DataTaxonomy. + # + # @overload list_data_attributes(request, options = nil) + # Pass arguments to `list_data_attributes` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataAttributesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_attributes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_attributes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new + # + # # Call the list_data_attributes method. + # result = client.list_data_attributes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. + # p item + # end + # + def list_data_attributes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_attributes.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_attributes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_attributes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :list_data_attributes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attributes, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a Data Attribute resource. + # + # @overload get_data_attribute(request, options = nil) + # Pass arguments to `get_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_attribute(name: nil) + # Pass arguments to `get_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataAttribute] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new + # + # # Call the get_data_attribute method. + # result = client.get_data_attribute request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. + # p result + # + def get_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_attribute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :get_data_attribute, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataTaxonomyService API. + # + # This class represents the configuration for DataTaxonomyService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_taxonomy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_taxonomy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_taxonomy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the DataTaxonomyService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_taxonomy + ## + # RPC-specific configuration for `update_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_taxonomy + ## + # RPC-specific configuration for `delete_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_taxonomy + ## + # RPC-specific configuration for `list_data_taxonomies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_taxonomies + ## + # RPC-specific configuration for `get_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_taxonomy + ## + # RPC-specific configuration for `create_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_attribute_binding + ## + # RPC-specific configuration for `update_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_attribute_binding + ## + # RPC-specific configuration for `delete_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_attribute_binding + ## + # RPC-specific configuration for `list_data_attribute_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_attribute_bindings + ## + # RPC-specific configuration for `get_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_attribute_binding + ## + # RPC-specific configuration for `create_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_attribute + ## + # RPC-specific configuration for `update_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_attribute + ## + # RPC-specific configuration for `delete_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_attribute + ## + # RPC-specific configuration for `list_data_attributes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_attributes + ## + # RPC-specific configuration for `get_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_attribute + + # @private + def initialize parent_rpcs = nil + create_data_taxonomy_config = parent_rpcs.create_data_taxonomy if parent_rpcs.respond_to? :create_data_taxonomy + @create_data_taxonomy = ::Gapic::Config::Method.new create_data_taxonomy_config + update_data_taxonomy_config = parent_rpcs.update_data_taxonomy if parent_rpcs.respond_to? :update_data_taxonomy + @update_data_taxonomy = ::Gapic::Config::Method.new update_data_taxonomy_config + delete_data_taxonomy_config = parent_rpcs.delete_data_taxonomy if parent_rpcs.respond_to? :delete_data_taxonomy + @delete_data_taxonomy = ::Gapic::Config::Method.new delete_data_taxonomy_config + list_data_taxonomies_config = parent_rpcs.list_data_taxonomies if parent_rpcs.respond_to? :list_data_taxonomies + @list_data_taxonomies = ::Gapic::Config::Method.new list_data_taxonomies_config + get_data_taxonomy_config = parent_rpcs.get_data_taxonomy if parent_rpcs.respond_to? :get_data_taxonomy + @get_data_taxonomy = ::Gapic::Config::Method.new get_data_taxonomy_config + create_data_attribute_binding_config = parent_rpcs.create_data_attribute_binding if parent_rpcs.respond_to? :create_data_attribute_binding + @create_data_attribute_binding = ::Gapic::Config::Method.new create_data_attribute_binding_config + update_data_attribute_binding_config = parent_rpcs.update_data_attribute_binding if parent_rpcs.respond_to? :update_data_attribute_binding + @update_data_attribute_binding = ::Gapic::Config::Method.new update_data_attribute_binding_config + delete_data_attribute_binding_config = parent_rpcs.delete_data_attribute_binding if parent_rpcs.respond_to? :delete_data_attribute_binding + @delete_data_attribute_binding = ::Gapic::Config::Method.new delete_data_attribute_binding_config + list_data_attribute_bindings_config = parent_rpcs.list_data_attribute_bindings if parent_rpcs.respond_to? :list_data_attribute_bindings + @list_data_attribute_bindings = ::Gapic::Config::Method.new list_data_attribute_bindings_config + get_data_attribute_binding_config = parent_rpcs.get_data_attribute_binding if parent_rpcs.respond_to? :get_data_attribute_binding + @get_data_attribute_binding = ::Gapic::Config::Method.new get_data_attribute_binding_config + create_data_attribute_config = parent_rpcs.create_data_attribute if parent_rpcs.respond_to? :create_data_attribute + @create_data_attribute = ::Gapic::Config::Method.new create_data_attribute_config + update_data_attribute_config = parent_rpcs.update_data_attribute if parent_rpcs.respond_to? :update_data_attribute + @update_data_attribute = ::Gapic::Config::Method.new update_data_attribute_config + delete_data_attribute_config = parent_rpcs.delete_data_attribute if parent_rpcs.respond_to? :delete_data_attribute + @delete_data_attribute = ::Gapic::Config::Method.new delete_data_attribute_config + list_data_attributes_config = parent_rpcs.list_data_attributes if parent_rpcs.respond_to? :list_data_attributes + @list_data_attributes = ::Gapic::Config::Method.new list_data_attributes_config + get_data_attribute_config = parent_rpcs.get_data_attribute if parent_rpcs.respond_to? :get_data_attribute + @get_data_attribute = ::Gapic::Config::Method.new get_data_attribute_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb new file mode 100644 index 000000000000..58c35cc846da --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + # Credentials for the DataTaxonomyService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb new file mode 100644 index 000000000000..4d0a0a769ebd --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb @@ -0,0 +1,801 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataTaxonomyService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTaxonomyService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb new file mode 100644 index 000000000000..24ff999c274b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + # Path helper methods for the DataTaxonomyService API. + module Paths + ## + # Create a fully-qualified DataAttribute resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}` + # + # @param project [String] + # @param location [String] + # @param dataTaxonomy [String] + # @param data_attribute_id [String] + # + # @return [::String] + def data_attribute_path project:, location:, dataTaxonomy:, data_attribute_id: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "dataTaxonomy cannot contain /" if dataTaxonomy.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataTaxonomies/#{dataTaxonomy}/attributes/#{data_attribute_id}" + end + + ## + # Create a fully-qualified DataAttributeBinding resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}` + # + # @param project [String] + # @param location [String] + # @param data_attribute_binding_id [String] + # + # @return [::String] + def data_attribute_binding_path project:, location:, data_attribute_binding_id: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataAttributeBindings/#{data_attribute_binding_id}" + end + + ## + # Create a fully-qualified DataTaxonomy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}` + # + # @param project [String] + # @param location [String] + # @param data_taxonomy_id [String] + # + # @return [::String] + def data_taxonomy_path project:, location:, data_taxonomy_id: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataTaxonomies/#{data_taxonomy_id}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb new file mode 100644 index 000000000000..9662b3d8beed --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/data_taxonomy_service/credentials" +require "google/cloud/dataplex/v1/data_taxonomy_service/paths" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest/operations" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest/client" + +module Google + module Cloud + module Dataplex + module V1 + ## + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/data_taxonomy_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + module DataTaxonomyService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb new file mode 100644 index 000000000000..ee63c2241640 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb @@ -0,0 +1,1841 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/data_taxonomy_pb" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + module Rest + ## + # REST client for the DataTaxonomyService service. + # + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + # + class Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_taxonomy_service_stub + + ## + # Configure the DataTaxonomyService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataTaxonomyService clients + # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTaxonomyService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_taxonomy_service_stub.universe_domain + end + + ## + # Create a new DataTaxonomyService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataTaxonomyService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @data_taxonomy_service_stub = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_taxonomy_service_stub.endpoint + config.universe_domain = @data_taxonomy_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_taxonomy_service_stub.endpoint + config.universe_domain = @data_taxonomy_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Create a DataTaxonomy resource. + # + # @overload create_data_taxonomy(request, options = nil) + # Pass arguments to `create_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_taxonomy(parent: nil, data_taxonomy_id: nil, data_taxonomy: nil, validate_only: nil) + # Pass arguments to `create_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 data_taxonomy_id [::String] + # 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 data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] + # Required. DataTaxonomy resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new + # + # # Call the create_data_taxonomy method. + # result = client.create_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_data_taxonomy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.create_data_taxonomy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataTaxonomy resource. + # + # @overload update_data_taxonomy(request, options = nil) + # Pass arguments to `update_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_taxonomy(update_mask: nil, data_taxonomy: nil, validate_only: nil) + # Pass arguments to `update_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new + # + # # Call the update_data_taxonomy method. + # result = client.update_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_taxonomy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.update_data_taxonomy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy + # must be deleted before the DataTaxonomy can be deleted. + # + # @overload delete_data_taxonomy(request, options = nil) + # Pass arguments to `delete_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_taxonomy(name: nil, etag: nil) + # Pass arguments to `delete_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value,the DeleteDataTaxonomy method returns an ABORTED error. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new + # + # # Call the delete_data_taxonomy method. + # result = client.delete_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_data_taxonomy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.delete_data_taxonomy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataTaxonomy resources in a project and location. + # + # @overload list_data_taxonomies(request, options = nil) + # Pass arguments to `list_data_taxonomies` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_taxonomies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new + # + # # Call the list_data_taxonomies method. + # result = client.list_data_taxonomies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. + # p item + # end + # + def list_data_taxonomies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_taxonomies.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_taxonomies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_taxonomies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.list_data_taxonomies request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a DataTaxonomy resource. + # + # @overload get_data_taxonomy(request, options = nil) + # Pass arguments to `get_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_taxonomy(name: nil) + # Pass arguments to `get_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new + # + # # Call the get_data_taxonomy method. + # result = client.get_data_taxonomy request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. + # p result + # + def get_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_taxonomy.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_taxonomy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.get_data_taxonomy request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a DataAttributeBinding resource. + # + # @overload create_data_attribute_binding(request, options = nil) + # Pass arguments to `create_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_attribute_binding(parent: nil, data_attribute_binding_id: nil, data_attribute_binding: nil, validate_only: nil) + # Pass arguments to `create_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id} + # @param data_attribute_binding_id [::String] + # 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 data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] + # Required. DataAttributeBinding resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new + # + # # Call the create_data_attribute_binding method. + # result = client.create_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_data_attribute_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.create_data_attribute_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataAttributeBinding resource. + # + # @overload update_data_attribute_binding(request, options = nil) + # Pass arguments to `update_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_attribute_binding(update_mask: nil, data_attribute_binding: nil, validate_only: nil) + # Pass arguments to `update_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new + # + # # Call the update_data_attribute_binding method. + # result = client.update_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_attribute_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.update_data_attribute_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataAttributeBinding resource. All attributes within the + # DataAttributeBinding must be deleted before the DataAttributeBinding can be + # deleted. + # + # @overload delete_data_attribute_binding(request, options = nil) + # Pass arguments to `delete_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_attribute_binding(name: nil, etag: nil) + # Pass arguments to `delete_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # @param etag [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new + # + # # Call the delete_data_attribute_binding method. + # result = client.delete_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_data_attribute_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.delete_data_attribute_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataAttributeBinding resources in a project and location. + # + # @overload list_data_attribute_bindings(request, options = nil) + # Pass arguments to `list_data_attribute_bindings` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_attribute_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_attribute_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the Location: + # projects/\\{project_number}/locations/\\{location_id} + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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 order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new + # + # # Call the list_data_attribute_bindings method. + # result = client.list_data_attribute_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. + # p item + # end + # + def list_data_attribute_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_attribute_bindings.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_attribute_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_attribute_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.list_data_attribute_bindings request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a DataAttributeBinding resource. + # + # @overload get_data_attribute_binding(request, options = nil) + # Pass arguments to `get_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_attribute_binding(name: nil) + # Pass arguments to `get_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new + # + # # Call the get_data_attribute_binding method. + # result = client.get_data_attribute_binding request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. + # p result + # + def get_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_attribute_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.get_data_attribute_binding request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a DataAttribute resource. + # + # @overload create_data_attribute(request, options = nil) + # Pass arguments to `create_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_attribute(parent: nil, data_attribute_id: nil, data_attribute: nil, validate_only: nil) + # Pass arguments to `create_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param data_attribute_id [::String] + # 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 data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] + # Required. DataAttribute resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new + # + # # Call the create_data_attribute method. + # result = client.create_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_data_attribute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.create_data_attribute request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataAttribute resource. + # + # @overload update_data_attribute(request, options = nil) + # Pass arguments to `update_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_attribute(update_mask: nil, data_attribute: nil, validate_only: nil) + # Pass arguments to `update_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new + # + # # Call the update_data_attribute method. + # result = client.update_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_attribute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.update_data_attribute request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Data Attribute resource. + # + # @overload delete_data_attribute(request, options = nil) + # Pass arguments to `delete_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_attribute(name: nil, etag: nil) + # Pass arguments to `delete_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteDataAttribute method returns an ABORTED error response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new + # + # # Call the delete_data_attribute method. + # result = client.delete_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_data_attribute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.delete_data_attribute request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Data Attribute resources in a DataTaxonomy. + # + # @overload list_data_attributes(request, options = nil) + # Pass arguments to `list_data_attributes` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataAttributesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_attributes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_attributes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new + # + # # Call the list_data_attributes method. + # result = client.list_data_attributes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. + # p item + # end + # + def list_data_attributes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_attributes.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_data_attributes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_attributes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.list_data_attributes request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a Data Attribute resource. + # + # @overload get_data_attribute(request, options = nil) + # Pass arguments to `get_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_attribute(name: nil) + # Pass arguments to `get_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttribute] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new + # + # # Call the get_data_attribute method. + # result = client.get_data_attribute request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. + # p result + # + def get_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_attribute.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_data_attribute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.get_data_attribute request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataTaxonomyService REST API. + # + # This class represents the configuration for DataTaxonomyService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_taxonomy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_taxonomy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_taxonomy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the DataTaxonomyService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_taxonomy + ## + # RPC-specific configuration for `update_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_taxonomy + ## + # RPC-specific configuration for `delete_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_taxonomy + ## + # RPC-specific configuration for `list_data_taxonomies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_taxonomies + ## + # RPC-specific configuration for `get_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_taxonomy + ## + # RPC-specific configuration for `create_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_attribute_binding + ## + # RPC-specific configuration for `update_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_attribute_binding + ## + # RPC-specific configuration for `delete_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_attribute_binding + ## + # RPC-specific configuration for `list_data_attribute_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_attribute_bindings + ## + # RPC-specific configuration for `get_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_attribute_binding + ## + # RPC-specific configuration for `create_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_attribute + ## + # RPC-specific configuration for `update_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_attribute + ## + # RPC-specific configuration for `delete_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_attribute + ## + # RPC-specific configuration for `list_data_attributes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_attributes + ## + # RPC-specific configuration for `get_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_attribute + + # @private + def initialize parent_rpcs = nil + create_data_taxonomy_config = parent_rpcs.create_data_taxonomy if parent_rpcs.respond_to? :create_data_taxonomy + @create_data_taxonomy = ::Gapic::Config::Method.new create_data_taxonomy_config + update_data_taxonomy_config = parent_rpcs.update_data_taxonomy if parent_rpcs.respond_to? :update_data_taxonomy + @update_data_taxonomy = ::Gapic::Config::Method.new update_data_taxonomy_config + delete_data_taxonomy_config = parent_rpcs.delete_data_taxonomy if parent_rpcs.respond_to? :delete_data_taxonomy + @delete_data_taxonomy = ::Gapic::Config::Method.new delete_data_taxonomy_config + list_data_taxonomies_config = parent_rpcs.list_data_taxonomies if parent_rpcs.respond_to? :list_data_taxonomies + @list_data_taxonomies = ::Gapic::Config::Method.new list_data_taxonomies_config + get_data_taxonomy_config = parent_rpcs.get_data_taxonomy if parent_rpcs.respond_to? :get_data_taxonomy + @get_data_taxonomy = ::Gapic::Config::Method.new get_data_taxonomy_config + create_data_attribute_binding_config = parent_rpcs.create_data_attribute_binding if parent_rpcs.respond_to? :create_data_attribute_binding + @create_data_attribute_binding = ::Gapic::Config::Method.new create_data_attribute_binding_config + update_data_attribute_binding_config = parent_rpcs.update_data_attribute_binding if parent_rpcs.respond_to? :update_data_attribute_binding + @update_data_attribute_binding = ::Gapic::Config::Method.new update_data_attribute_binding_config + delete_data_attribute_binding_config = parent_rpcs.delete_data_attribute_binding if parent_rpcs.respond_to? :delete_data_attribute_binding + @delete_data_attribute_binding = ::Gapic::Config::Method.new delete_data_attribute_binding_config + list_data_attribute_bindings_config = parent_rpcs.list_data_attribute_bindings if parent_rpcs.respond_to? :list_data_attribute_bindings + @list_data_attribute_bindings = ::Gapic::Config::Method.new list_data_attribute_bindings_config + get_data_attribute_binding_config = parent_rpcs.get_data_attribute_binding if parent_rpcs.respond_to? :get_data_attribute_binding + @get_data_attribute_binding = ::Gapic::Config::Method.new get_data_attribute_binding_config + create_data_attribute_config = parent_rpcs.create_data_attribute if parent_rpcs.respond_to? :create_data_attribute + @create_data_attribute = ::Gapic::Config::Method.new create_data_attribute_config + update_data_attribute_config = parent_rpcs.update_data_attribute if parent_rpcs.respond_to? :update_data_attribute + @update_data_attribute = ::Gapic::Config::Method.new update_data_attribute_config + delete_data_attribute_config = parent_rpcs.delete_data_attribute if parent_rpcs.respond_to? :delete_data_attribute + @delete_data_attribute = ::Gapic::Config::Method.new delete_data_attribute_config + list_data_attributes_config = parent_rpcs.list_data_attributes if parent_rpcs.respond_to? :list_data_attributes + @list_data_attributes = ::Gapic::Config::Method.new list_data_attributes_config + get_data_attribute_config = parent_rpcs.get_data_attribute if parent_rpcs.respond_to? :get_data_attribute + @get_data_attribute = ::Gapic::Config::Method.new get_data_attribute_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb new file mode 100644 index 000000000000..e94682c4a3c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb @@ -0,0 +1,895 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataTaxonomyService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTaxonomyService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb new file mode 100644 index 000000000000..cf511be91af6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb @@ -0,0 +1,960 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/data_taxonomy_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + module Rest + ## + # REST service stub for the DataTaxonomyService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the create_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_data_taxonomy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_taxonomy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_data_taxonomy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_taxonomy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_data_taxonomy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_taxonomy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_data_taxonomies REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] + # A result object deserialized from the server's reply + def list_data_taxonomies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_taxonomies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # A result object deserialized from the server's reply + def get_data_taxonomy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_taxonomy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataTaxonomy.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_data_attribute_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_attribute_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_data_attribute_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_attribute_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_data_attribute_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_attribute_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_data_attribute_bindings REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] + # A result object deserialized from the server's reply + def list_data_attribute_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_attribute_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # A result object deserialized from the server's reply + def get_data_attribute_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_attribute_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_data_attribute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_attribute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_data_attribute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_attribute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_data_attribute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_attribute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_data_attributes REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] + # A result object deserialized from the server's reply + def list_data_attributes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_attributes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttribute] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # A result object deserialized from the server's reply + def get_data_attribute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_attribute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataAttribute.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_taxonomy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTaxonomies", + body: "data_taxonomy", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_taxonomy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_taxonomy.name}", + body: "data_taxonomy", + matches: [ + ["data_taxonomy.name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_taxonomy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_taxonomies REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_taxonomies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataTaxonomies", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_taxonomy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_attribute_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataAttributeBindings", + body: "data_attribute_binding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_attribute_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_attribute_binding.name}", + body: "data_attribute_binding", + matches: [ + ["data_attribute_binding.name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_attribute_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_attribute_bindings REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_attribute_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataAttributeBindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_attribute_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_attribute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/attributes", + body: "data_attribute", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_attribute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_attribute.name}", + body: "data_attribute", + matches: [ + ["data_attribute.name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_attribute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_attributes REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_attributes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/attributes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_attribute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb new file mode 100644 index 000000000000..b65e661271ce --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb @@ -0,0 +1,77 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/data_taxonomy.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# + +require 'grpc' +require 'google/cloud/dataplex/v1/data_taxonomy_pb' + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.DataTaxonomyService' + + # Create a DataTaxonomy resource. + rpc :CreateDataTaxonomy, ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Google::Longrunning::Operation + # Updates a DataTaxonomy resource. + rpc :UpdateDataTaxonomy, ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Google::Longrunning::Operation + # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy + # must be deleted before the DataTaxonomy can be deleted. + rpc :DeleteDataTaxonomy, ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Google::Longrunning::Operation + # Lists DataTaxonomy resources in a project and location. + rpc :ListDataTaxonomies, ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse + # Retrieves a DataTaxonomy resource. + rpc :GetDataTaxonomy, ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Google::Cloud::Dataplex::V1::DataTaxonomy + # Create a DataAttributeBinding resource. + rpc :CreateDataAttributeBinding, ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Google::Longrunning::Operation + # Updates a DataAttributeBinding resource. + rpc :UpdateDataAttributeBinding, ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Google::Longrunning::Operation + # Deletes a DataAttributeBinding resource. All attributes within the + # DataAttributeBinding must be deleted before the DataAttributeBinding can be + # deleted. + rpc :DeleteDataAttributeBinding, ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Google::Longrunning::Operation + # Lists DataAttributeBinding resources in a project and location. + rpc :ListDataAttributeBindings, ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse + # Retrieves a DataAttributeBinding resource. + rpc :GetDataAttributeBinding, ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Google::Cloud::Dataplex::V1::DataAttributeBinding + # Create a DataAttribute resource. + rpc :CreateDataAttribute, ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Google::Longrunning::Operation + # Updates a DataAttribute resource. + rpc :UpdateDataAttribute, ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Google::Longrunning::Operation + # Deletes a Data Attribute resource. + rpc :DeleteDataAttribute, ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Google::Longrunning::Operation + # Lists Data Attribute resources in a DataTaxonomy. + rpc :ListDataAttributes, ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse + # Retrieves a Data Attribute resource. + rpc :GetDataAttribute, ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Google::Cloud::Dataplex::V1::DataAttribute + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb new file mode 100644 index 000000000000..aefbd2740e2d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +require "google/cloud/dataplex/v1/dataplex_service/credentials" +require "google/cloud/dataplex/v1/dataplex_service/paths" +require "google/cloud/dataplex/v1/dataplex_service/operations" +require "google/cloud/dataplex/v1/dataplex_service/client" +require "google/cloud/dataplex/v1/dataplex_service/rest" + +module Google + module Cloud + module Dataplex + module 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. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/dataplex_service" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dataplex/v1/dataplex_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module DataplexService + end + end + end + end +end + +helper_path = ::File.join __dir__, "dataplex_service", "helpers.rb" +require "google/cloud/dataplex/v1/dataplex_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb new file mode 100644 index 000000000000..d761c77f09aa --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb @@ -0,0 +1,3950 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + ## + # Client for the DataplexService service. + # + # 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 Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dataplex_service_stub + + ## + # Configure the DataplexService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataplexService clients + # ::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_lake.timeout = 60.0 + + default_config.rpcs.update_lake.timeout = 60.0 + + default_config.rpcs.delete_lake.timeout = 60.0 + + default_config.rpcs.list_lakes.timeout = 60.0 + default_config.rpcs.list_lakes.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_lake.timeout = 60.0 + default_config.rpcs.get_lake.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_lake_actions.timeout = 60.0 + default_config.rpcs.list_lake_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_zone.timeout = 60.0 + + default_config.rpcs.update_zone.timeout = 60.0 + + default_config.rpcs.delete_zone.timeout = 60.0 + + default_config.rpcs.list_zones.timeout = 60.0 + default_config.rpcs.list_zones.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_zone.timeout = 60.0 + default_config.rpcs.get_zone.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_zone_actions.timeout = 60.0 + default_config.rpcs.list_zone_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_asset.timeout = 60.0 + + default_config.rpcs.update_asset.timeout = 60.0 + + default_config.rpcs.delete_asset.timeout = 60.0 + + default_config.rpcs.list_assets.timeout = 60.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_asset.timeout = 60.0 + default_config.rpcs.get_asset.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_asset_actions.timeout = 60.0 + default_config.rpcs.list_asset_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_task.timeout = 60.0 + + default_config.rpcs.update_task.timeout = 60.0 + + default_config.rpcs.delete_task.timeout = 60.0 + + default_config.rpcs.list_tasks.timeout = 60.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task.timeout = 60.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_jobs.timeout = 60.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_job.timeout = 60.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.cancel_job.timeout = 60.0 + + default_config.rpcs.create_environment.timeout = 60.0 + + default_config.rpcs.update_environment.timeout = 60.0 + + default_config.rpcs.delete_environment.timeout = 60.0 + + default_config.rpcs.list_environments.timeout = 60.0 + default_config.rpcs.list_environments.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_environment.timeout = 60.0 + default_config.rpcs.get_environment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataplexService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @dataplex_service_stub.universe_domain + end + + ## + # Create a new DataplexService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataplexService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @dataplex_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::DataplexService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataplex_service_stub.endpoint + config.universe_domain = @dataplex_service_stub.universe_domain + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataplex_service_stub.endpoint + config.universe_domain = @dataplex_service_stub.universe_domain + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataplexService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Creates a lake resource. + # + # @overload create_lake(request, options = nil) + # Pass arguments to `create_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil) + # Pass arguments to `create_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 lake_id [::String] + # 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 lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] + # Required. Lake resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new + # + # # Call the create_lake method. + # result = client.create_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_lake.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :create_lake, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a lake resource. + # + # @overload update_lake(request, options = nil) + # Pass arguments to `update_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_lake(update_mask: nil, lake: nil, validate_only: nil) + # Pass arguments to `update_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new + # + # # Call the update_lake method. + # result = client.update_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.lake&.name + header_params["lake.name"] = request.lake.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_lake.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :update_lake, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a lake resource. All zones within the lake must be deleted before + # the lake can be deleted. + # + # @overload delete_lake(request, options = nil) + # Pass arguments to `delete_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_lake(name: nil) + # Pass arguments to `delete_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new + # + # # Call the delete_lake method. + # result = client.delete_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_lake.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :delete_lake, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists lake resources in a project and location. + # + # @overload list_lakes(request, options = nil) + # Pass arguments to `list_lakes` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListLakesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_lakes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListLakesRequest.new + # + # # Call the list_lakes method. + # result = client.list_lakes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. + # p item + # end + # + def list_lakes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_lakes.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_lakes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_lakes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_lakes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lakes, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a lake resource. + # + # @overload get_lake(request, options = nil) + # Pass arguments to `get_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_lake(name: nil) + # Pass arguments to `get_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Lake] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Lake] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetLakeRequest.new + # + # # Call the get_lake method. + # result = client.get_lake request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Lake. + # p result + # + def get_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_lake.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_lake, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in a lake. + # + # @overload list_lake_actions(request, options = nil) + # Pass arguments to `list_lake_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListLakeActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_lake_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_lake_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new + # + # # Call the list_lake_actions method. + # result = client.list_lake_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_lake_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_lake_actions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_lake_actions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_lake_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_lake_actions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a zone resource within a lake. + # + # @overload create_zone(request, options = nil) + # Pass arguments to `create_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil) + # Pass arguments to `create_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param zone_id [::String] + # 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 zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] + # Required. Zone resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new + # + # # Call the create_zone method. + # result = client.create_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_zone.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :create_zone, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a zone resource. + # + # @overload update_zone(request, options = nil) + # Pass arguments to `update_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_zone(update_mask: nil, zone: nil, validate_only: nil) + # Pass arguments to `update_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new + # + # # Call the update_zone method. + # result = client.update_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.zone&.name + header_params["zone.name"] = request.zone.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_zone.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :update_zone, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a zone resource. All assets within a zone must be deleted before + # the zone can be deleted. + # + # @overload delete_zone(request, options = nil) + # Pass arguments to `delete_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_zone(name: nil) + # Pass arguments to `delete_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new + # + # # Call the delete_zone method. + # result = client.delete_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_zone.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :delete_zone, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists zone resources in a lake. + # + # @overload list_zones(request, options = nil) + # Pass arguments to `list_zones` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListZonesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_zones` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListZonesRequest.new + # + # # Call the list_zones method. + # result = client.list_zones request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. + # p item + # end + # + def list_zones request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZonesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_zones.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_zones.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_zones.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_zones, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zones, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a zone resource. + # + # @overload get_zone(request, options = nil) + # Pass arguments to `get_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_zone(name: nil) + # Pass arguments to `get_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Zone] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Zone] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetZoneRequest.new + # + # # Call the get_zone method. + # result = client.get_zone request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Zone. + # p result + # + def get_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_zone.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_zone, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in a zone. + # + # @overload list_zone_actions(request, options = nil) + # Pass arguments to `list_zone_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListZoneActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_zone_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_zone_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new + # + # # Call the list_zone_actions method. + # result = client.list_zone_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_zone_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_zone_actions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_zone_actions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_zone_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_zone_actions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an asset resource. + # + # @overload create_asset(request, options = nil) + # Pass arguments to `create_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil) + # Pass arguments to `create_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param asset_id [::String] + # 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 asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] + # Required. Asset resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new + # + # # Call the create_asset method. + # result = client.create_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :create_asset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an asset resource. + # + # @overload update_asset(request, options = nil) + # Pass arguments to `update_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_asset(update_mask: nil, asset: nil, validate_only: nil) + # Pass arguments to `update_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new + # + # # Call the update_asset method. + # result = client.update_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.asset&.name + header_params["asset.name"] = request.asset.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :update_asset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an asset resource. The referenced storage resource is detached + # (default) or deleted based on the associated Lifecycle policy. + # + # @overload delete_asset(request, options = nil) + # Pass arguments to `delete_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_asset(name: nil) + # Pass arguments to `delete_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new + # + # # Call the delete_asset method. + # result = client.delete_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :delete_asset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists asset resources in a zone. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_assets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_assets, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves an asset resource. + # + # @overload get_asset(request, options = nil) + # Pass arguments to `get_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_asset(name: nil) + # Pass arguments to `get_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Asset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Asset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetAssetRequest.new + # + # # Call the get_asset method. + # result = client.get_asset request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Asset. + # p result + # + def get_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_asset, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in an asset. + # + # @overload list_asset_actions(request, options = nil) + # Pass arguments to `list_asset_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAssetActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_asset_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_asset_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new + # + # # Call the list_asset_actions method. + # result = client.list_asset_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_asset_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_asset_actions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_asset_actions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_asset_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_asset_actions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a task resource within a lake. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_task(parent: nil, task_id: nil, task: nil, validate_only: nil) + # Pass arguments to `create_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param task_id [::String] + # Required. Task identifier. + # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] + # Required. Task resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :create_task, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the task resource. + # + # @overload update_task(request, options = nil) + # Pass arguments to `update_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_task(update_mask: nil, task: nil, validate_only: nil) + # Pass arguments to `update_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new + # + # # Call the update_task method. + # result = client.update_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.task&.name + header_params["task.name"] = request.task.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :update_task, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete the task resource. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_task(name: nil) + # Pass arguments to `delete_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new + # + # # Call the delete_task method. + # result = client.delete_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :delete_task, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists tasks under the given lake. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_tasks, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get task resource. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_task(name: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_task, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Jobs under the given task. + # + # @overload list_jobs(request, options = nil) + # Pass arguments to `list_jobs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_jobs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListJobsRequest.new + # + # # Call the list_jobs method. + # result = client.list_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Job. + # p item + # end + # + def list_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_jobs.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_jobs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_jobs, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Run an on demand execution of a Task. + # + # @overload run_task(request, options = nil) + # Pass arguments to `run_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::RunTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_task(name: nil, labels: nil, args: nil) + # Pass arguments to `run_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @param labels [::Hash{::String => ::String}] + # 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 args [::Hash{::String => ::String}] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::RunTaskRequest.new + # + # # Call the run_task method. + # result = client.run_task request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. + # p result + # + def run_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :run_task, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get job resource. + # + # @overload get_job(request, options = nil) + # Pass arguments to `get_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_job(name: nil) + # Pass arguments to `get_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Job] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Job] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetJobRequest.new + # + # # Call the get_job method. + # result = client.get_job request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Job. + # p result + # + def get_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_job.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_job, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancel jobs running for the task resource. + # + # @overload cancel_job(request, options = nil) + # Pass arguments to `cancel_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CancelJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_job(name: nil) + # Pass arguments to `cancel_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CancelJobRequest.new + # + # # Call the cancel_job method. + # result = client.cancel_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_job.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :cancel_job, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create an environment resource. + # + # @overload create_environment(request, options = nil) + # Pass arguments to `create_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_environment(parent: nil, environment_id: nil, environment: nil, validate_only: nil) + # Pass arguments to `create_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + # @param environment_id [::String] + # 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 environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] + # Required. Environment resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new + # + # # Call the create_environment method. + # result = client.create_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_environment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :create_environment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the environment resource. + # + # @overload update_environment(request, options = nil) + # Pass arguments to `update_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_environment(update_mask: nil, environment: nil, validate_only: nil) + # Pass arguments to `update_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new + # + # # Call the update_environment method. + # result = client.update_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.environment&.name + header_params["environment.name"] = request.environment.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_environment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :update_environment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete the environment resource. All the child resources must have been + # deleted before environment deletion can be initiated. + # + # @overload delete_environment(request, options = nil) + # Pass arguments to `delete_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_environment(name: nil) + # Pass arguments to `delete_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the environment: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new + # + # # Call the delete_environment method. + # result = client.delete_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_environment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :delete_environment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists environments under the given lake. + # + # @overload list_environments(request, options = nil) + # Pass arguments to `list_environments` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_environments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_environments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new + # + # # Call the list_environments method. + # result = client.list_environments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Environment. + # p item + # end + # + def list_environments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_environments.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_environments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_environments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_environments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_environments, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get environment resource. + # + # @overload get_environment(request, options = nil) + # Pass arguments to `get_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_environment(name: nil) + # Pass arguments to `get_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the environment: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Environment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Environment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new + # + # # Call the get_environment method. + # result = client.get_environment request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Environment. + # p result + # + def get_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_environment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_environment, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists session resources in an environment. + # + # @overload list_sessions(request, options = nil) + # Pass arguments to `list_sessions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListSessionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListSessionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_sessions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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 + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new + # + # # Call the list_sessions method. + # result = client.list_sessions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Session. + # p item + # end + # + def list_sessions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListSessionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_sessions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_sessions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sessions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_sessions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_sessions, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataplexService API. + # + # This class represents the configuration for DataplexService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_lake to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_lake.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_lake.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the DataplexService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :create_lake + ## + # RPC-specific configuration for `update_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :update_lake + ## + # RPC-specific configuration for `delete_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lake + ## + # RPC-specific configuration for `list_lakes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lakes + ## + # RPC-specific configuration for `get_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lake + ## + # RPC-specific configuration for `list_lake_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lake_actions + ## + # RPC-specific configuration for `create_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :create_zone + ## + # RPC-specific configuration for `update_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :update_zone + ## + # RPC-specific configuration for `delete_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_zone + ## + # RPC-specific configuration for `list_zones` + # @return [::Gapic::Config::Method] + # + attr_reader :list_zones + ## + # RPC-specific configuration for `get_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :get_zone + ## + # RPC-specific configuration for `list_zone_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_zone_actions + ## + # RPC-specific configuration for `create_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_asset + ## + # RPC-specific configuration for `update_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_asset + ## + # RPC-specific configuration for `delete_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_asset + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `get_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_asset + ## + # RPC-specific configuration for `list_asset_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_asset_actions + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `update_task` + # @return [::Gapic::Config::Method] + # + attr_reader :update_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `list_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_jobs + ## + # RPC-specific configuration for `run_task` + # @return [::Gapic::Config::Method] + # + attr_reader :run_task + ## + # RPC-specific configuration for `get_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job + ## + # RPC-specific configuration for `cancel_job` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_job + ## + # RPC-specific configuration for `create_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_environment + ## + # RPC-specific configuration for `update_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_environment + ## + # RPC-specific configuration for `delete_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_environment + ## + # RPC-specific configuration for `list_environments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_environments + ## + # RPC-specific configuration for `get_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_environment + ## + # RPC-specific configuration for `list_sessions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sessions + + # @private + def initialize parent_rpcs = nil + create_lake_config = parent_rpcs.create_lake if parent_rpcs.respond_to? :create_lake + @create_lake = ::Gapic::Config::Method.new create_lake_config + update_lake_config = parent_rpcs.update_lake if parent_rpcs.respond_to? :update_lake + @update_lake = ::Gapic::Config::Method.new update_lake_config + delete_lake_config = parent_rpcs.delete_lake if parent_rpcs.respond_to? :delete_lake + @delete_lake = ::Gapic::Config::Method.new delete_lake_config + list_lakes_config = parent_rpcs.list_lakes if parent_rpcs.respond_to? :list_lakes + @list_lakes = ::Gapic::Config::Method.new list_lakes_config + get_lake_config = parent_rpcs.get_lake if parent_rpcs.respond_to? :get_lake + @get_lake = ::Gapic::Config::Method.new get_lake_config + list_lake_actions_config = parent_rpcs.list_lake_actions if parent_rpcs.respond_to? :list_lake_actions + @list_lake_actions = ::Gapic::Config::Method.new list_lake_actions_config + create_zone_config = parent_rpcs.create_zone if parent_rpcs.respond_to? :create_zone + @create_zone = ::Gapic::Config::Method.new create_zone_config + update_zone_config = parent_rpcs.update_zone if parent_rpcs.respond_to? :update_zone + @update_zone = ::Gapic::Config::Method.new update_zone_config + delete_zone_config = parent_rpcs.delete_zone if parent_rpcs.respond_to? :delete_zone + @delete_zone = ::Gapic::Config::Method.new delete_zone_config + list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones + @list_zones = ::Gapic::Config::Method.new list_zones_config + get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone + @get_zone = ::Gapic::Config::Method.new get_zone_config + list_zone_actions_config = parent_rpcs.list_zone_actions if parent_rpcs.respond_to? :list_zone_actions + @list_zone_actions = ::Gapic::Config::Method.new list_zone_actions_config + create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset + @create_asset = ::Gapic::Config::Method.new create_asset_config + update_asset_config = parent_rpcs.update_asset if parent_rpcs.respond_to? :update_asset + @update_asset = ::Gapic::Config::Method.new update_asset_config + delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset + @delete_asset = ::Gapic::Config::Method.new delete_asset_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset + @get_asset = ::Gapic::Config::Method.new get_asset_config + list_asset_actions_config = parent_rpcs.list_asset_actions if parent_rpcs.respond_to? :list_asset_actions + @list_asset_actions = ::Gapic::Config::Method.new list_asset_actions_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task + @update_task = ::Gapic::Config::Method.new update_task_config + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task + @delete_task = ::Gapic::Config::Method.new delete_task_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs + @list_jobs = ::Gapic::Config::Method.new list_jobs_config + run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task + @run_task = ::Gapic::Config::Method.new run_task_config + get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job + @get_job = ::Gapic::Config::Method.new get_job_config + cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job + @cancel_job = ::Gapic::Config::Method.new cancel_job_config + create_environment_config = parent_rpcs.create_environment if parent_rpcs.respond_to? :create_environment + @create_environment = ::Gapic::Config::Method.new create_environment_config + update_environment_config = parent_rpcs.update_environment if parent_rpcs.respond_to? :update_environment + @update_environment = ::Gapic::Config::Method.new update_environment_config + delete_environment_config = parent_rpcs.delete_environment if parent_rpcs.respond_to? :delete_environment + @delete_environment = ::Gapic::Config::Method.new delete_environment_config + list_environments_config = parent_rpcs.list_environments if parent_rpcs.respond_to? :list_environments + @list_environments = ::Gapic::Config::Method.new list_environments_config + get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment + @get_environment = ::Gapic::Config::Method.new get_environment_config + list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions + @list_sessions = ::Gapic::Config::Method.new list_sessions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb new file mode 100644 index 000000000000..ca24868d1300 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + # Credentials for the DataplexService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb new file mode 100644 index 000000000000..e9203215706a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb @@ -0,0 +1,801 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataplexService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataplexService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb new file mode 100644 index 000000000000..bf8d60dd39e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb @@ -0,0 +1,178 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + # Path helper methods for the DataplexService API. + module Paths + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # @param asset [String] + # + # @return [::String] + def asset_path project:, location:, lake:, zone:, asset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/assets/#{asset}" + end + + ## + # Create a fully-qualified Environment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param environment [String] + # + # @return [::String] + def environment_path project:, location:, lake:, environment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/environments/#{environment}" + end + + ## + # Create a fully-qualified Job resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param task [String] + # @param job [String] + # + # @return [::String] + def job_path project:, location:, lake:, task:, job: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "task cannot contain /" if task.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/tasks/#{task}/jobs/#{job}" + end + + ## + # Create a fully-qualified Lake resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # + # @return [::String] + def lake_path project:, location:, lake: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Task resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param task [String] + # + # @return [::String] + def task_path project:, location:, lake:, task: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/tasks/#{task}" + end + + ## + # Create a fully-qualified Zone resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # + # @return [::String] + def zone_path project:, location:, lake:, zone: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb new file mode 100644 index 000000000000..76c9f9aa9a0d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/dataplex_service/credentials" +require "google/cloud/dataplex/v1/dataplex_service/paths" +require "google/cloud/dataplex/v1/dataplex_service/rest/operations" +require "google/cloud/dataplex/v1/dataplex_service/rest/client" + +module Google + module Cloud + module Dataplex + module 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. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/dataplex_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module DataplexService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/dataplex_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb new file mode 100644 index 000000000000..6c8e3c4c6d88 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb @@ -0,0 +1,3700 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/service_pb" +require "google/cloud/dataplex/v1/dataplex_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + module Rest + ## + # REST client for the DataplexService service. + # + # 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 Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dataplex_service_stub + + ## + # Configure the DataplexService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataplexService clients + # ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_lake.timeout = 60.0 + + default_config.rpcs.update_lake.timeout = 60.0 + + default_config.rpcs.delete_lake.timeout = 60.0 + + default_config.rpcs.list_lakes.timeout = 60.0 + default_config.rpcs.list_lakes.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_lake.timeout = 60.0 + default_config.rpcs.get_lake.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_lake_actions.timeout = 60.0 + default_config.rpcs.list_lake_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_zone.timeout = 60.0 + + default_config.rpcs.update_zone.timeout = 60.0 + + default_config.rpcs.delete_zone.timeout = 60.0 + + default_config.rpcs.list_zones.timeout = 60.0 + default_config.rpcs.list_zones.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_zone.timeout = 60.0 + default_config.rpcs.get_zone.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_zone_actions.timeout = 60.0 + default_config.rpcs.list_zone_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_asset.timeout = 60.0 + + default_config.rpcs.update_asset.timeout = 60.0 + + default_config.rpcs.delete_asset.timeout = 60.0 + + default_config.rpcs.list_assets.timeout = 60.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_asset.timeout = 60.0 + default_config.rpcs.get_asset.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_asset_actions.timeout = 60.0 + default_config.rpcs.list_asset_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_task.timeout = 60.0 + + default_config.rpcs.update_task.timeout = 60.0 + + default_config.rpcs.delete_task.timeout = 60.0 + + default_config.rpcs.list_tasks.timeout = 60.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task.timeout = 60.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_jobs.timeout = 60.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_job.timeout = 60.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.cancel_job.timeout = 60.0 + + default_config.rpcs.create_environment.timeout = 60.0 + + default_config.rpcs.update_environment.timeout = 60.0 + + default_config.rpcs.delete_environment.timeout = 60.0 + + default_config.rpcs.list_environments.timeout = 60.0 + default_config.rpcs.list_environments.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_environment.timeout = 60.0 + default_config.rpcs.get_environment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataplexService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @dataplex_service_stub.universe_domain + end + + ## + # Create a new DataplexService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataplexService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @dataplex_service_stub = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataplex_service_stub.endpoint + config.universe_domain = @dataplex_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataplex_service_stub.endpoint + config.universe_domain = @dataplex_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataplexService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Creates a lake resource. + # + # @overload create_lake(request, options = nil) + # Pass arguments to `create_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil) + # Pass arguments to `create_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 lake_id [::String] + # 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 lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] + # Required. Lake resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new + # + # # Call the create_lake method. + # result = client.create_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_lake.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.create_lake request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a lake resource. + # + # @overload update_lake(request, options = nil) + # Pass arguments to `update_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_lake(update_mask: nil, lake: nil, validate_only: nil) + # Pass arguments to `update_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new + # + # # Call the update_lake method. + # result = client.update_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_lake.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.update_lake request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a lake resource. All zones within the lake must be deleted before + # the lake can be deleted. + # + # @overload delete_lake(request, options = nil) + # Pass arguments to `delete_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_lake(name: nil) + # Pass arguments to `delete_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new + # + # # Call the delete_lake method. + # result = client.delete_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_lake.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.delete_lake request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists lake resources in a project and location. + # + # @overload list_lakes(request, options = nil) + # Pass arguments to `list_lakes` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListLakesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_lakes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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 page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListLakesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListLakesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListLakesRequest.new + # + # # Call the list_lakes method. + # result = client.list_lakes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. + # p item + # end + # + def list_lakes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_lakes.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_lakes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_lakes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_lakes request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a lake resource. + # + # @overload get_lake(request, options = nil) + # Pass arguments to `get_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_lake(name: nil) + # Pass arguments to `get_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Lake] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Lake] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetLakeRequest.new + # + # # Call the get_lake method. + # result = client.get_lake request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Lake. + # p result + # + def get_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_lake.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_lake.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_lake request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in a lake. + # + # @overload list_lake_actions(request, options = nil) + # Pass arguments to `list_lake_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListLakeActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_lake_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_lake_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new + # + # # Call the list_lake_actions method. + # result = client.list_lake_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_lake_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_lake_actions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_lake_actions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_lake_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_lake_actions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, "actions", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a zone resource within a lake. + # + # @overload create_zone(request, options = nil) + # Pass arguments to `create_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil) + # Pass arguments to `create_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param zone_id [::String] + # 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 zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] + # Required. Zone resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new + # + # # Call the create_zone method. + # result = client.create_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_zone.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.create_zone request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a zone resource. + # + # @overload update_zone(request, options = nil) + # Pass arguments to `update_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_zone(update_mask: nil, zone: nil, validate_only: nil) + # Pass arguments to `update_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new + # + # # Call the update_zone method. + # result = client.update_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_zone.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.update_zone request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a zone resource. All assets within a zone must be deleted before + # the zone can be deleted. + # + # @overload delete_zone(request, options = nil) + # Pass arguments to `delete_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_zone(name: nil) + # Pass arguments to `delete_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new + # + # # Call the delete_zone method. + # result = client.delete_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_zone.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.delete_zone request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists zone resources in a lake. + # + # @overload list_zones(request, options = nil) + # Pass arguments to `list_zones` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListZonesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_zones` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListZonesRequest.new + # + # # Call the list_zones method. + # result = client.list_zones request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. + # p item + # end + # + def list_zones request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZonesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_zones.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_zones.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_zones.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_zones request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zones, "zones", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a zone resource. + # + # @overload get_zone(request, options = nil) + # Pass arguments to `get_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_zone(name: nil) + # Pass arguments to `get_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Zone] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Zone] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetZoneRequest.new + # + # # Call the get_zone method. + # result = client.get_zone request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Zone. + # p result + # + def get_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_zone.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_zone.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_zone request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in a zone. + # + # @overload list_zone_actions(request, options = nil) + # Pass arguments to `list_zone_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListZoneActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_zone_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_zone_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new + # + # # Call the list_zone_actions method. + # result = client.list_zone_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_zone_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_zone_actions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_zone_actions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_zone_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_zone_actions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, "actions", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an asset resource. + # + # @overload create_asset(request, options = nil) + # Pass arguments to `create_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil) + # Pass arguments to `create_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param asset_id [::String] + # 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 asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] + # Required. Asset resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new + # + # # Call the create_asset method. + # result = client.create_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.create_asset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an asset resource. + # + # @overload update_asset(request, options = nil) + # Pass arguments to `update_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_asset(update_mask: nil, asset: nil, validate_only: nil) + # Pass arguments to `update_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new + # + # # Call the update_asset method. + # result = client.update_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.update_asset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an asset resource. The referenced storage resource is detached + # (default) or deleted based on the associated Lifecycle policy. + # + # @overload delete_asset(request, options = nil) + # Pass arguments to `delete_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_asset(name: nil) + # Pass arguments to `delete_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new + # + # # Call the delete_asset method. + # result = client.delete_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.delete_asset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists asset resources in a zone. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_assets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_assets, "assets", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves an asset resource. + # + # @overload get_asset(request, options = nil) + # Pass arguments to `get_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_asset(name: nil) + # Pass arguments to `get_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Asset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Asset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetAssetRequest.new + # + # # Call the get_asset method. + # result = client.get_asset request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Asset. + # p result + # + def get_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_asset.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_asset request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in an asset. + # + # @overload list_asset_actions(request, options = nil) + # Pass arguments to `list_asset_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAssetActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_asset_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_asset_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new + # + # # Call the list_asset_actions method. + # result = client.list_asset_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_asset_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_asset_actions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_asset_actions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_asset_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_asset_actions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, "actions", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a task resource within a lake. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_task(parent: nil, task_id: nil, task: nil, validate_only: nil) + # Pass arguments to `create_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param task_id [::String] + # Required. Task identifier. + # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] + # Required. Task resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.create_task request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the task resource. + # + # @overload update_task(request, options = nil) + # Pass arguments to `update_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_task(update_mask: nil, task: nil, validate_only: nil) + # Pass arguments to `update_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new + # + # # Call the update_task method. + # result = client.update_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.update_task request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete the task resource. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_task(name: nil) + # Pass arguments to `delete_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new + # + # # Call the delete_task method. + # result = client.delete_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.delete_task request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists tasks under the given lake. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListTasksResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_tasks request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get task resource. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_task(name: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_task request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Jobs under the given task. + # + # @overload list_jobs(request, options = nil) + # Pass arguments to `list_jobs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_jobs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListJobsRequest.new + # + # # Call the list_jobs method. + # result = client.list_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Job. + # p item + # end + # + def list_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_jobs.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_jobs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_jobs, "jobs", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Run an on demand execution of a Task. + # + # @overload run_task(request, options = nil) + # Pass arguments to `run_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::RunTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_task(name: nil, labels: nil, args: nil) + # Pass arguments to `run_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @param labels [::Hash{::String => ::String}] + # 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 args [::Hash{::String => ::String}] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::RunTaskRequest.new + # + # # Call the run_task method. + # result = client.run_task request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. + # p result + # + def run_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_task.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.run_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.run_task request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get job resource. + # + # @overload get_job(request, options = nil) + # Pass arguments to `get_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_job(name: nil) + # Pass arguments to `get_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Job] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetJobRequest.new + # + # # Call the get_job method. + # result = client.get_job request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Job. + # p result + # + def get_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_job.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_job request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancel jobs running for the task resource. + # + # @overload cancel_job(request, options = nil) + # Pass arguments to `cancel_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CancelJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_job(name: nil) + # Pass arguments to `cancel_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CancelJobRequest.new + # + # # Call the cancel_job method. + # result = client.cancel_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_job.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.cancel_job request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create an environment resource. + # + # @overload create_environment(request, options = nil) + # Pass arguments to `create_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_environment(parent: nil, environment_id: nil, environment: nil, validate_only: nil) + # Pass arguments to `create_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + # @param environment_id [::String] + # 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 environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] + # Required. Environment resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new + # + # # Call the create_environment method. + # result = client.create_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_environment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.create_environment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the environment resource. + # + # @overload update_environment(request, options = nil) + # Pass arguments to `update_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_environment(update_mask: nil, environment: nil, validate_only: nil) + # Pass arguments to `update_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new + # + # # Call the update_environment method. + # result = client.update_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_environment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.update_environment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete the environment resource. All the child resources must have been + # deleted before environment deletion can be initiated. + # + # @overload delete_environment(request, options = nil) + # Pass arguments to `delete_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_environment(name: nil) + # Pass arguments to `delete_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the environment: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new + # + # # Call the delete_environment method. + # result = client.delete_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_environment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.delete_environment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists environments under the given lake. + # + # @overload list_environments(request, options = nil) + # Pass arguments to `list_environments` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_environments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_environments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new + # + # # Call the list_environments method. + # result = client.list_environments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Environment. + # p item + # end + # + def list_environments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_environments.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_environments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_environments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_environments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_environments, "environments", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get environment resource. + # + # @overload get_environment(request, options = nil) + # Pass arguments to `get_environment` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_environment(name: nil) + # Pass arguments to `get_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the environment: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Environment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Environment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new + # + # # Call the get_environment method. + # result = client.get_environment request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Environment. + # p result + # + def get_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_environment.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_environment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_environment request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists session resources in an environment. + # + # @overload list_sessions(request, options = nil) + # Pass arguments to `list_sessions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListSessionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListSessionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_sessions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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 + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new + # + # # Call the list_sessions method. + # result = client.list_sessions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Session. + # p item + # end + # + def list_sessions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListSessionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_sessions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_sessions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sessions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_sessions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_sessions, "sessions", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataplexService REST API. + # + # This class represents the configuration for DataplexService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_lake to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_lake.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_lake.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the DataplexService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :create_lake + ## + # RPC-specific configuration for `update_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :update_lake + ## + # RPC-specific configuration for `delete_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lake + ## + # RPC-specific configuration for `list_lakes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lakes + ## + # RPC-specific configuration for `get_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lake + ## + # RPC-specific configuration for `list_lake_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lake_actions + ## + # RPC-specific configuration for `create_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :create_zone + ## + # RPC-specific configuration for `update_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :update_zone + ## + # RPC-specific configuration for `delete_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_zone + ## + # RPC-specific configuration for `list_zones` + # @return [::Gapic::Config::Method] + # + attr_reader :list_zones + ## + # RPC-specific configuration for `get_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :get_zone + ## + # RPC-specific configuration for `list_zone_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_zone_actions + ## + # RPC-specific configuration for `create_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_asset + ## + # RPC-specific configuration for `update_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_asset + ## + # RPC-specific configuration for `delete_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_asset + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `get_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_asset + ## + # RPC-specific configuration for `list_asset_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_asset_actions + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `update_task` + # @return [::Gapic::Config::Method] + # + attr_reader :update_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `list_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_jobs + ## + # RPC-specific configuration for `run_task` + # @return [::Gapic::Config::Method] + # + attr_reader :run_task + ## + # RPC-specific configuration for `get_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job + ## + # RPC-specific configuration for `cancel_job` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_job + ## + # RPC-specific configuration for `create_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_environment + ## + # RPC-specific configuration for `update_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_environment + ## + # RPC-specific configuration for `delete_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_environment + ## + # RPC-specific configuration for `list_environments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_environments + ## + # RPC-specific configuration for `get_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_environment + ## + # RPC-specific configuration for `list_sessions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sessions + + # @private + def initialize parent_rpcs = nil + create_lake_config = parent_rpcs.create_lake if parent_rpcs.respond_to? :create_lake + @create_lake = ::Gapic::Config::Method.new create_lake_config + update_lake_config = parent_rpcs.update_lake if parent_rpcs.respond_to? :update_lake + @update_lake = ::Gapic::Config::Method.new update_lake_config + delete_lake_config = parent_rpcs.delete_lake if parent_rpcs.respond_to? :delete_lake + @delete_lake = ::Gapic::Config::Method.new delete_lake_config + list_lakes_config = parent_rpcs.list_lakes if parent_rpcs.respond_to? :list_lakes + @list_lakes = ::Gapic::Config::Method.new list_lakes_config + get_lake_config = parent_rpcs.get_lake if parent_rpcs.respond_to? :get_lake + @get_lake = ::Gapic::Config::Method.new get_lake_config + list_lake_actions_config = parent_rpcs.list_lake_actions if parent_rpcs.respond_to? :list_lake_actions + @list_lake_actions = ::Gapic::Config::Method.new list_lake_actions_config + create_zone_config = parent_rpcs.create_zone if parent_rpcs.respond_to? :create_zone + @create_zone = ::Gapic::Config::Method.new create_zone_config + update_zone_config = parent_rpcs.update_zone if parent_rpcs.respond_to? :update_zone + @update_zone = ::Gapic::Config::Method.new update_zone_config + delete_zone_config = parent_rpcs.delete_zone if parent_rpcs.respond_to? :delete_zone + @delete_zone = ::Gapic::Config::Method.new delete_zone_config + list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones + @list_zones = ::Gapic::Config::Method.new list_zones_config + get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone + @get_zone = ::Gapic::Config::Method.new get_zone_config + list_zone_actions_config = parent_rpcs.list_zone_actions if parent_rpcs.respond_to? :list_zone_actions + @list_zone_actions = ::Gapic::Config::Method.new list_zone_actions_config + create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset + @create_asset = ::Gapic::Config::Method.new create_asset_config + update_asset_config = parent_rpcs.update_asset if parent_rpcs.respond_to? :update_asset + @update_asset = ::Gapic::Config::Method.new update_asset_config + delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset + @delete_asset = ::Gapic::Config::Method.new delete_asset_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset + @get_asset = ::Gapic::Config::Method.new get_asset_config + list_asset_actions_config = parent_rpcs.list_asset_actions if parent_rpcs.respond_to? :list_asset_actions + @list_asset_actions = ::Gapic::Config::Method.new list_asset_actions_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task + @update_task = ::Gapic::Config::Method.new update_task_config + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task + @delete_task = ::Gapic::Config::Method.new delete_task_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs + @list_jobs = ::Gapic::Config::Method.new list_jobs_config + run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task + @run_task = ::Gapic::Config::Method.new run_task_config + get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job + @get_job = ::Gapic::Config::Method.new get_job_config + cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job + @cancel_job = ::Gapic::Config::Method.new cancel_job_config + create_environment_config = parent_rpcs.create_environment if parent_rpcs.respond_to? :create_environment + @create_environment = ::Gapic::Config::Method.new create_environment_config + update_environment_config = parent_rpcs.update_environment if parent_rpcs.respond_to? :update_environment + @update_environment = ::Gapic::Config::Method.new update_environment_config + delete_environment_config = parent_rpcs.delete_environment if parent_rpcs.respond_to? :delete_environment + @delete_environment = ::Gapic::Config::Method.new delete_environment_config + list_environments_config = parent_rpcs.list_environments if parent_rpcs.respond_to? :list_environments + @list_environments = ::Gapic::Config::Method.new list_environments_config + get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment + @get_environment = ::Gapic::Config::Method.new get_environment_config + list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions + @list_sessions = ::Gapic::Config::Method.new list_sessions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb new file mode 100644 index 000000000000..0dec2450e6f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb @@ -0,0 +1,895 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataplexService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataplexService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb new file mode 100644 index 000000000000..8a828884a451 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb @@ -0,0 +1,2028 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/service_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + module Rest + ## + # REST service stub for the DataplexService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the create_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateLakeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_lake request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_lake_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateLakeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_lake request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_lake_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteLakeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_lake request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_lake_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_lakes REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListLakesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListLakesResponse] + # A result object deserialized from the server's reply + def list_lakes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_lakes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListLakesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetLakeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Lake] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Lake] + # A result object deserialized from the server's reply + def get_lake request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lake_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Lake.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_lake_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # A result object deserialized from the server's reply + def list_lake_actions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_lake_actions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateZoneRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_zone request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_zone_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateZoneRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_zone request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_zone_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteZoneRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_zone request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_zone_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_zones REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListZonesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListZonesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListZonesResponse] + # A result object deserialized from the server's reply + def list_zones request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_zones_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListZonesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetZoneRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Zone] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Zone] + # A result object deserialized from the server's reply + def get_zone request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_zone_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Zone.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_zone_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # A result object deserialized from the server's reply + def list_zone_actions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_zone_actions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_assets REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListAssetsResponse] + # A result object deserialized from the server's reply + def list_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Asset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Asset] + # A result object deserialized from the server's reply + def get_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Asset.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_asset_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # A result object deserialized from the server's reply + def list_asset_actions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_asset_actions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_tasks REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListTasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListTasksResponse] + # A result object deserialized from the server's reply + def list_tasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Task] + # A result object deserialized from the server's reply + def get_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Task.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_jobs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListJobsResponse] + # A result object deserialized from the server's reply + def list_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the run_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::RunTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # A result object deserialized from the server's reply + def run_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::RunTaskResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Job] + # A result object deserialized from the server's reply + def get_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Job.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the cancel_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CancelJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_environment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_environment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_environment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_environment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_environment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_environment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_environments REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse] + # A result object deserialized from the server's reply + def list_environments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_environments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Environment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Environment] + # A result object deserialized from the server's reply + def get_environment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_environment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Environment.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_sessions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListSessionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListSessionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListSessionsResponse] + # A result object deserialized from the server's reply + def list_sessions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sessions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListSessionsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the create_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateLakeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_lake_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/lakes", + body: "lake", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateLakeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_lake_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{lake.name}", + body: "lake", + matches: [ + ["lake.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteLakeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_lake_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_lakes REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_lakes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/lakes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetLakeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_lake_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_lake_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_lake_actions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/actions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateZoneRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_zone_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/zones", + body: "zone", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateZoneRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_zone_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{zone.name}", + body: "zone", + matches: [ + ["zone.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteZoneRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_zone_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_zones REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListZonesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_zones_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/zones", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetZoneRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_zone_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_zone_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_zone_actions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/actions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/assets", + body: "asset", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{asset.name}", + body: "asset", + matches: [ + ["asset.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_assets REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/assets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_asset_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_asset_actions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/actions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/tasks", + body: "task", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{task.name}", + body: "task", + matches: [ + ["task.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tasks REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListTasksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/tasks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_jobs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListJobsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/jobs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::RunTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:run", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CancelJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_environment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/environments", + body: "environment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_environment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{environment.name}", + body: "environment", + matches: [ + ["environment.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_environment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_environments REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_environments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/environments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_environment REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_environment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sessions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListSessionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_sessions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/sessions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb new file mode 100644 index 000000000000..36b7d41e7d77 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/datascans.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/data_profile_pb' +require 'google/cloud/dataplex/v1/data_quality_pb' +require 'google/cloud/dataplex/v1/processing_pb' +require 'google/cloud/dataplex/v1/resources_pb' +require 'google/cloud/dataplex/v1/service_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n(google/cloud/dataplex/v1/datascans.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/dataplex/v1/data_profile.proto\x1a+google/cloud/dataplex/v1/data_quality.proto\x1a)google/cloud/dataplex/v1/processing.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc5\x01\n\x15\x43reateDataScanRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\tdata_scan\x18\x02 \x01(\x0b\x32\".google.cloud.dataplex.v1.DataScanB\x03\xe0\x41\x02\x12\x19\n\x0c\x64\x61ta_scan_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa5\x01\n\x15UpdateDataScanRequest\x12:\n\tdata_scan\x18\x01 \x01(\x0b\x32\".google.cloud.dataplex.v1.DataScanB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x15\x44\x65leteDataScanRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\"\xdf\x01\n\x12GetDataScanRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\x12L\n\x04view\x18\x02 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.GetDataScanRequest.DataScanViewB\x03\xe0\x41\x01\"C\n\x0c\x44\x61taScanView\x12\x1e\n\x1a\x44\x41TA_SCAN_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\n\"\xae\x01\n\x14ListDataScansRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"}\n\x15ListDataScansResponse\x12\x36\n\ndata_scans\x18\x01 \x03(\x0b\x32\".google.cloud.dataplex.v1.DataScan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"L\n\x12RunDataScanRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\"I\n\x13RunDataScanResponse\x12\x32\n\x03job\x18\x01 \x01(\x0b\x32%.google.cloud.dataplex.v1.DataScanJob\"\xf2\x01\n\x15GetDataScanJobRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/DataScanJob\x12R\n\x04view\x18\x02 \x01(\x0e\x32?.google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobViewB\x03\xe0\x41\x01\"J\n\x0f\x44\x61taScanJobView\x12\"\n\x1e\x44\x41TA_SCAN_JOB_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\n\"\x99\x01\n\x17ListDataScanJobsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"r\n\x18ListDataScanJobsResponse\x12=\n\x0e\x64\x61ta_scan_jobs\x18\x01 \x03(\x0b\x32%.google.cloud.dataplex.v1.DataScanJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"4\n\x1fGenerateDataQualityRulesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"[\n GenerateDataQualityRulesResponse\x12\x37\n\x04rule\x18\x01 \x03(\x0b\x32).google.cloud.dataplex.v1.DataQualityRule\"\xb1\n\n\x08\x44\x61taScan\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x06labels\x18\x05 \x03(\x0b\x32..google.cloud.dataplex.v1.DataScan.LabelsEntryB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x06 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x04\x64\x61ta\x18\t \x01(\x0b\x32$.google.cloud.dataplex.v1.DataSourceB\x03\xe0\x41\x02\x12M\n\x0e\x65xecution_spec\x18\n \x01(\x0b\x32\x30.google.cloud.dataplex.v1.DataScan.ExecutionSpecB\x03\xe0\x41\x01\x12Q\n\x10\x65xecution_status\x18\x0b \x01(\x0b\x32\x32.google.cloud.dataplex.v1.DataScan.ExecutionStatusB\x03\xe0\x41\x03\x12\x39\n\x04type\x18\x0c \x01(\x0e\x32&.google.cloud.dataplex.v1.DataScanTypeB\x03\xe0\x41\x03\x12\x46\n\x11\x64\x61ta_quality_spec\x18\x64 \x01(\x0b\x32).google.cloud.dataplex.v1.DataQualitySpecH\x00\x12\x46\n\x11\x64\x61ta_profile_spec\x18\x65 \x01(\x0b\x32).google.cloud.dataplex.v1.DataProfileSpecH\x00\x12P\n\x13\x64\x61ta_quality_result\x18\xc8\x01 \x01(\x0b\x32+.google.cloud.dataplex.v1.DataQualityResultB\x03\xe0\x41\x03H\x01\x12P\n\x13\x64\x61ta_profile_result\x18\xc9\x01 \x01(\x0b\x32+.google.cloud.dataplex.v1.DataProfileResultB\x03\xe0\x41\x03H\x01\x1am\n\rExecutionSpec\x12\x37\n\x07trigger\x18\x01 \x01(\x0b\x32!.google.cloud.dataplex.v1.TriggerB\x03\xe0\x41\x01\x12\x14\n\x05\x66ield\x18\x64 \x01(\tB\x03\xe0\x41\x05H\x00\x42\r\n\x0bincremental\x1a\x85\x01\n\x0f\x45xecutionStatus\x12\x39\n\x15latest_job_start_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13latest_job_end_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:c\xea\x41`\n dataplex.googleapis.com/DataScan\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/dataScans\x12\xaf\x01\n\x0bRunDataScan\x12,.google.cloud.dataplex.v1.RunDataScanRequest\x1a-.google.cloud.dataplex.v1.RunDataScanResponse\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/dataScans/*}:run:\x01*\x12\xad\x01\n\x0eGetDataScanJob\x12/.google.cloud.dataplex.v1.GetDataScanJobRequest\x1a%.google.cloud.dataplex.v1.DataScanJob\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}\x12\xc0\x01\n\x10ListDataScanJobs\x12\x31.google.cloud.dataplex.v1.ListDataScanJobsRequest\x1a\x32.google.cloud.dataplex.v1.ListDataScanJobsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*/dataScans/*}/jobs\x12\xc1\x02\n\x18GenerateDataQualityRules\x12\x39.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest\x1a:.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse\"\xad\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x9f\x01\"F/v1/{name=projects/*/locations/*/dataScans/*}:generateDataQualityRules:\x01*ZR\"M/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}:generateDataQualityRules:\x01*\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBj\n\x1c\x63om.google.cloud.dataplex.v1B\x0e\x44\x61taScansProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.cloud.dataplex.v1.DataQualityRule", "google/cloud/dataplex/v1/data_quality.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.dataplex.v1.DataSource", "google/cloud/dataplex/v1/processing.proto"], + ["google.cloud.dataplex.v1.DataProfileSpec", "google/cloud/dataplex/v1/data_profile.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + CreateDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataScanRequest").msgclass + UpdateDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataScanRequest").msgclass + DeleteDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataScanRequest").msgclass + GetDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanRequest").msgclass + GetDataScanRequest::DataScanView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanRequest.DataScanView").enummodule + ListDataScansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScansRequest").msgclass + ListDataScansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScansResponse").msgclass + RunDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunDataScanRequest").msgclass + RunDataScanResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunDataScanResponse").msgclass + GetDataScanJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanJobRequest").msgclass + GetDataScanJobRequest::DataScanJobView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView").enummodule + ListDataScanJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScanJobsRequest").msgclass + ListDataScanJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScanJobsResponse").msgclass + GenerateDataQualityRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GenerateDataQualityRulesRequest").msgclass + GenerateDataQualityRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GenerateDataQualityRulesResponse").msgclass + DataScan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan").msgclass + DataScan::ExecutionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan.ExecutionSpec").msgclass + DataScan::ExecutionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan.ExecutionStatus").msgclass + DataScanJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanJob").msgclass + DataScanJob::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanJob.State").enummodule + DataScanType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb new file mode 100644 index 000000000000..42b166f1493f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb @@ -0,0 +1,63 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/datascans.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# + +require 'grpc' +require 'google/cloud/dataplex/v1/datascans_pb' + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + # 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 Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.DataScanService' + + # Creates a DataScan resource. + rpc :CreateDataScan, ::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Google::Longrunning::Operation + # Updates a DataScan resource. + rpc :UpdateDataScan, ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Google::Longrunning::Operation + # Deletes a DataScan resource. + rpc :DeleteDataScan, ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Google::Longrunning::Operation + # Gets a DataScan resource. + rpc :GetDataScan, ::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Google::Cloud::Dataplex::V1::DataScan + # Lists DataScans. + rpc :ListDataScans, ::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Google::Cloud::Dataplex::V1::ListDataScansResponse + # Runs an on-demand execution of a DataScan + rpc :RunDataScan, ::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Google::Cloud::Dataplex::V1::RunDataScanResponse + # Gets a DataScanJob resource. + rpc :GetDataScanJob, ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Google::Cloud::Dataplex::V1::DataScanJob + # Lists DataScanJobs under the given DataScan. + rpc :ListDataScanJobs, ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse + # Generates recommended DataQualityRule from a data profiling DataScan. + rpc :GenerateDataQualityRules, ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb new file mode 100644 index 000000000000..358f748a0eaa --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/logs.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n#google/cloud/dataplex/v1/logs.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\t\n\x0e\x44iscoveryEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07lake_id\x18\x02 \x01(\t\x12\x0f\n\x07zone_id\x18\x03 \x01(\t\x12\x10\n\x08\x61sset_id\x18\x04 \x01(\t\x12\x15\n\rdata_location\x18\x05 \x01(\t\x12@\n\x04type\x18\n \x01(\x0e\x32\x32.google.cloud.dataplex.v1.DiscoveryEvent.EventType\x12H\n\x06\x63onfig\x18\x14 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetailsH\x00\x12H\n\x06\x65ntity\x18\x15 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetailsH\x00\x12N\n\tpartition\x18\x16 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetailsH\x00\x12H\n\x06\x61\x63tion\x18\x17 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetailsH\x00\x1a\x9e\x01\n\rConfigDetails\x12Z\n\nparameters\x18\x01 \x03(\x0b\x32\x46.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.ParametersEntry\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x62\n\rEntityDetails\x12\x0e\n\x06\x65ntity\x18\x01 \x01(\t\x12\x41\n\x04type\x18\x02 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.DiscoveryEvent.EntityType\x1a\x98\x01\n\x10PartitionDetails\x12\x11\n\tpartition\x18\x01 \x01(\t\x12\x0e\n\x06\x65ntity\x18\x02 \x01(\t\x12\x41\n\x04type\x18\x03 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.DiscoveryEvent.EntityType\x12\x1e\n\x16sampled_data_locations\x18\x04 \x03(\t\x1a\x1d\n\rActionDetails\x12\x0c\n\x04type\x18\x01 \x01(\t\"\xb4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43ONFIG\x10\x01\x12\x12\n\x0e\x45NTITY_CREATED\x10\x02\x12\x12\n\x0e\x45NTITY_UPDATED\x10\x03\x12\x12\n\x0e\x45NTITY_DELETED\x10\x04\x12\x15\n\x11PARTITION_CREATED\x10\x05\x12\x15\n\x11PARTITION_UPDATED\x10\x06\x12\x15\n\x11PARTITION_DELETED\x10\x07\"A\n\nEntityType\x12\x1b\n\x17\x45NTITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02\x42\t\n\x07\x64\x65tails\"\xc5\x05\n\x08JobEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x05state\x18\x05 \x01(\x0e\x32(.google.cloud.dataplex.v1.JobEvent.State\x12\x0f\n\x07retries\x18\x06 \x01(\x05\x12\x35\n\x04type\x18\x07 \x01(\x0e\x32\'.google.cloud.dataplex.v1.JobEvent.Type\x12;\n\x07service\x18\x08 \x01(\x0e\x32*.google.cloud.dataplex.v1.JobEvent.Service\x12\x13\n\x0bservice_job\x18\t \x01(\t\x12N\n\x11\x65xecution_trigger\x18\x0b \x01(\x0e\x32\x33.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SPARK\x10\x01\x12\x0c\n\x08NOTEBOOK\x10\x02\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\x0b\n\x07\x41\x42ORTED\x10\x04\"0\n\x07Service\x12\x17\n\x13SERVICE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TAPROC\x10\x01\"W\n\x10\x45xecutionTrigger\x12!\n\x1d\x45XECUTION_TRIGGER_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTASK_CONFIG\x10\x01\x12\x0f\n\x0bRUN_REQUEST\x10\x02\"\xbd\x05\n\x0cSessionEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07user_id\x18\x02 \x01(\t\x12\x12\n\nsession_id\x18\x03 \x01(\t\x12>\n\x04type\x18\x04 \x01(\x0e\x32\x30.google.cloud.dataplex.v1.SessionEvent.EventType\x12\x43\n\x05query\x18\x05 \x01(\x0b\x32\x32.google.cloud.dataplex.v1.SessionEvent.QueryDetailH\x00\x12\x17\n\x0f\x65vent_succeeded\x18\x06 \x01(\x08\x12\x1c\n\x14\x66\x61st_startup_enabled\x18\x07 \x01(\x08\x12\x36\n\x13unassigned_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\xa3\x02\n\x0bQueryDetail\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12\x12\n\nquery_text\x18\x02 \x01(\t\x12I\n\x06\x65ngine\x18\x03 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine\x12+\n\x08\x64uration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x19\n\x11result_size_bytes\x18\x05 \x01(\x03\x12\x1c\n\x14\x64\x61ta_processed_bytes\x18\x06 \x01(\x03\"=\n\x06\x45ngine\x12\x16\n\x12\x45NGINE_UNSPECIFIED\x10\x00\x12\r\n\tSPARK_SQL\x10\x01\x12\x0c\n\x08\x42IGQUERY\x10\x02\"S\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05START\x10\x01\x12\x08\n\x04STOP\x10\x02\x12\t\n\x05QUERY\x10\x03\x12\n\n\x06\x43REATE\x10\x04\x42\x08\n\x06\x64\x65tail\"\xba\x07\n\x0fGovernanceEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12G\n\nevent_type\x18\x02 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.GovernanceEvent.EventType\x12\x45\n\x06\x65ntity\x18\x03 \x01(\x0b\x32\x30.google.cloud.dataplex.v1.GovernanceEvent.EntityH\x00\x88\x01\x01\x1a\xd2\x01\n\x06\x45ntity\x12\x33\n\x06\x65ntity\x18\x01 \x01(\tB#\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12P\n\x0b\x65ntity_type\x18\x02 \x01(\x0e\x32;.google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType\"A\n\nEntityType\x12\x1b\n\x17\x45NTITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02\"\xa5\x04\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aRESOURCE_IAM_POLICY_UPDATE\x10\x01\x12\x19\n\x15\x42IGQUERY_TABLE_CREATE\x10\x02\x12\x19\n\x15\x42IGQUERY_TABLE_UPDATE\x10\x03\x12\x19\n\x15\x42IGQUERY_TABLE_DELETE\x10\x04\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_CREATE\x10\x05\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_UPDATE\x10\x06\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_DELETE\x10\x07\x12\x1c\n\x18\x42IGQUERY_TAXONOMY_CREATE\x10\n\x12\x1e\n\x1a\x42IGQUERY_POLICY_TAG_CREATE\x10\x0b\x12\x1e\n\x1a\x42IGQUERY_POLICY_TAG_DELETE\x10\x0c\x12&\n\"BIGQUERY_POLICY_TAG_SET_IAM_POLICY\x10\r\x12\x18\n\x14\x41\x43\x43\x45SS_POLICY_UPDATE\x10\x0e\x12%\n!GOVERNANCE_RULE_MATCHED_RESOURCES\x10\x0f\x12(\n$GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS\x10\x10\x12\x1a\n\x16GOVERNANCE_RULE_ERRORS\x10\x11\x12\x1e\n\x1aGOVERNANCE_RULE_PROCESSING\x10\x12\x42\t\n\x07_entity\"\xf3\x12\n\rDataScanEvent\x12\x13\n\x0b\x64\x61ta_source\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x04type\x18\x05 \x01(\x0e\x32\x30.google.cloud.dataplex.v1.DataScanEvent.ScanType\x12<\n\x05state\x18\x06 \x01(\x0e\x32-.google.cloud.dataplex.v1.DataScanEvent.State\x12\x0f\n\x07message\x18\x07 \x01(\t\x12\x14\n\x0cspec_version\x18\x08 \x01(\t\x12@\n\x07trigger\x18\t \x01(\x0e\x32/.google.cloud.dataplex.v1.DataScanEvent.Trigger\x12<\n\x05scope\x18\n \x01(\x0e\x32-.google.cloud.dataplex.v1.DataScanEvent.Scope\x12Q\n\x0c\x64\x61ta_profile\x18\x65 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultH\x00\x12Q\n\x0c\x64\x61ta_quality\x18\x66 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultH\x00\x12\x62\n\x14\x64\x61ta_profile_configs\x18\xc9\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigsH\x01\x12\x62\n\x14\x64\x61ta_quality_configs\x18\xca\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigsH\x01\x12_\n\x18post_scan_actions_result\x18\x0b \x01(\x0b\x32=.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult\x1a&\n\x11\x44\x61taProfileResult\x12\x11\n\trow_count\x18\x01 \x01(\x03\x1a\x9c\x04\n\x11\x44\x61taQualityResult\x12\x11\n\trow_count\x18\x01 \x01(\x03\x12\x0e\n\x06passed\x18\x02 \x01(\x08\x12h\n\x10\x64imension_passed\x18\x03 \x03(\x0b\x32N.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.DimensionPassedEntry\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x66\n\x0f\x64imension_score\x18\x05 \x03(\x0b\x32M.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.DimensionScoreEntry\x12`\n\x0c\x63olumn_score\x18\x06 \x03(\x0b\x32J.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.ColumnScoreEntry\x1a\x36\n\x14\x44imensionPassedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\x35\n\x13\x44imensionScoreEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1a\x32\n\x10\x43olumnScoreEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1ap\n\x19\x44\x61taProfileAppliedConfigs\x12\x18\n\x10sampling_percent\x18\x01 \x01(\x02\x12\x1a\n\x12row_filter_applied\x18\x02 \x01(\x08\x12\x1d\n\x15\x63olumn_filter_applied\x18\x03 \x01(\x08\x1aQ\n\x19\x44\x61taQualityAppliedConfigs\x12\x18\n\x10sampling_percent\x18\x01 \x01(\x02\x12\x1a\n\x12row_filter_applied\x18\x02 \x01(\x08\x1a\xe6\x02\n\x15PostScanActionsResult\x12r\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32R.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult\x1a\xd8\x01\n\x14\x42igQueryExportResult\x12g\n\x05state\x18\x01 \x01(\x0e\x32X.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State\x12\x0f\n\x07message\x18\x02 \x01(\t\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\"I\n\x08ScanType\x12\x19\n\x15SCAN_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_PROFILE\x10\x01\x12\x10\n\x0c\x44\x41TA_QUALITY\x10\x02\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x12\x0b\n\x07\x43REATED\x10\x05\"?\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\x0c\n\x08SCHEDULE\x10\x02\"9\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\x0f\n\x0bINCREMENTAL\x10\x02\x42\x08\n\x06resultB\x10\n\x0e\x61ppliedConfigs\"\x99\x07\n\x19\x44\x61taQualityScanRuleResult\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x61ta_source\x18\x02 \x01(\t\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\t\x12\x11\n\trule_name\x18\x04 \x01(\t\x12O\n\trule_type\x18\x05 \x01(\x0e\x32<.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType\x12Z\n\x0e\x65valution_type\x18\x06 \x01(\x0e\x32\x42.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType\x12\x16\n\x0erule_dimension\x18\x07 \x01(\t\x12\x19\n\x11threshold_percent\x18\x08 \x01(\x01\x12J\n\x06result\x18\t \x01(\x0e\x32:.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result\x12\x1b\n\x13\x65valuated_row_count\x18\n \x01(\x03\x12\x18\n\x10passed_row_count\x18\x0b \x01(\x03\x12\x16\n\x0enull_row_count\x18\x0c \x01(\x03\x12\x1b\n\x13\x61ssertion_row_count\x18\r \x01(\x03\"\x92\x02\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14NON_NULL_EXPECTATION\x10\x01\x12\x15\n\x11RANGE_EXPECTATION\x10\x02\x12\x15\n\x11REGEX_EXPECTATION\x10\x03\x12\x1d\n\x19ROW_CONDITION_EXPECTATION\x10\x04\x12\x13\n\x0fSET_EXPECTATION\x10\x05\x12\x1f\n\x1bSTATISTIC_RANGE_EXPECTATION\x10\x06\x12\x1f\n\x1bTABLE_CONDITION_EXPECTATION\x10\x07\x12\x1a\n\x16UNIQUENESS_EXPECTATION\x10\x08\x12\x11\n\rSQL_ASSERTION\x10\t\"M\n\x0e\x45valuationType\x12\x1f\n\x1b\x45VALUATION_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PER_ROW\x10\x01\x12\r\n\tAGGREGATE\x10\x02\"8\n\x06Result\x12\x16\n\x12RESULT_UNSPECIFIED\x10\x00\x12\n\n\x06PASSED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x42\x65\n\x1c\x63om.google.cloud.dataplex.v1B\tLogsProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + DiscoveryEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent").msgclass + DiscoveryEvent::ConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails").msgclass + DiscoveryEvent::EntityDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails").msgclass + DiscoveryEvent::PartitionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails").msgclass + DiscoveryEvent::ActionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails").msgclass + DiscoveryEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EventType").enummodule + DiscoveryEvent::EntityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EntityType").enummodule + JobEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent").msgclass + JobEvent::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.Type").enummodule + JobEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.State").enummodule + JobEvent::Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.Service").enummodule + JobEvent::ExecutionTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.ExecutionTrigger").enummodule + SessionEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent").msgclass + SessionEvent::QueryDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.QueryDetail").msgclass + SessionEvent::QueryDetail::Engine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine").enummodule + SessionEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.EventType").enummodule + GovernanceEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent").msgclass + GovernanceEvent::Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.Entity").msgclass + GovernanceEvent::Entity::EntityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType").enummodule + GovernanceEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.EventType").enummodule + DataScanEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent").msgclass + DataScanEvent::DataProfileResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataProfileResult").msgclass + DataScanEvent::DataQualityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataQualityResult").msgclass + DataScanEvent::DataProfileAppliedConfigs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs").msgclass + DataScanEvent::DataQualityAppliedConfigs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs").msgclass + DataScanEvent::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult").msgclass + DataScanEvent::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult").msgclass + DataScanEvent::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State").enummodule + DataScanEvent::ScanType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.ScanType").enummodule + DataScanEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.State").enummodule + DataScanEvent::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.Trigger").enummodule + DataScanEvent::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.Scope").enummodule + DataQualityScanRuleResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult").msgclass + DataQualityScanRuleResult::RuleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType").enummodule + DataQualityScanRuleResult::EvaluationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType").enummodule + DataQualityScanRuleResult::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.Result").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb new file mode 100644 index 000000000000..9f92bf741053 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/metadata.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\'google/cloud/dataplex/v1/metadata.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9e\x01\n\x13\x43reateEntityRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x35\n\x06\x65ntity\x18\x03 \x01(\x0b\x32 .google.cloud.dataplex.v1.EntityB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"h\n\x13UpdateEntityRequest\x12\x35\n\x06\x65ntity\x18\x02 \x01(\x0b\x32 .google.cloud.dataplex.v1.EntityB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"^\n\x13\x44\x65leteEntityRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xa3\x02\n\x13ListEntitiesRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12K\n\x04view\x18\x02 \x01(\x0e\x32\x38.google.cloud.dataplex.v1.ListEntitiesRequest.EntityViewB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"C\n\nEntityView\x12\x1b\n\x17\x45NTITY_VIEW_UNSPECIFIED\x10\x00\x12\n\n\x06TABLES\x10\x01\x12\x0c\n\x08\x46ILESETS\x10\x02\"c\n\x14ListEntitiesResponse\x12\x32\n\x08\x65ntities\x18\x01 \x03(\x0b\x32 .google.cloud.dataplex.v1.Entity\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xde\x01\n\x10GetEntityRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12H\n\x04view\x18\x02 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.GetEntityRequest.EntityViewB\x03\xe0\x41\x01\"J\n\nEntityView\x12\x1b\n\x17\x45NTITY_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\n\n\x06SCHEMA\x10\x02\x12\x08\n\x04\x46ULL\x10\x04\"\x95\x01\n\x15ListPartitionsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa9\x01\n\x16\x43reatePartitionRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12;\n\tpartition\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.PartitionB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x16\x44\x65letePartitionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/Partition\x12\x13\n\x04\x65tag\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x01\"j\n\x16ListPartitionsResponse\x12\x37\n\npartitions\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.Partition\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x13GetPartitionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/Partition\"\xc9\t\n\x06\x45ntity\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12;\n\x04type\x18\n \x01(\x0e\x32%.google.cloud.dataplex.v1.Entity.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x15\n\x05\x61sset\x18\x0b \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x19\n\tdata_path\x18\x0c \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1e\n\x11\x64\x61ta_path_pattern\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rcatalog_entry\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12?\n\x06system\x18\x0f \x01(\x0e\x32\'.google.cloud.dataplex.v1.StorageSystemB\x06\xe0\x41\x02\xe0\x41\x05\x12<\n\x06\x66ormat\x18\x10 \x01(\x0b\x32\'.google.cloud.dataplex.v1.StorageFormatB\x03\xe0\x41\x02\x12P\n\rcompatibility\x18\x13 \x01(\x0b\x32\x34.google.cloud.dataplex.v1.Entity.CompatibilityStatusB\x03\xe0\x41\x03\x12<\n\x06\x61\x63\x63\x65ss\x18\x15 \x01(\x0b\x32\'.google.cloud.dataplex.v1.StorageAccessB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12\x35\n\x06schema\x18\x32 \x01(\x0b\x32 .google.cloud.dataplex.v1.SchemaB\x03\xe0\x41\x02\x1a\x90\x02\n\x13\x43ompatibilityStatus\x12_\n\x0ehive_metastore\x18\x01 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.Entity.CompatibilityStatus.CompatibilityB\x03\xe0\x41\x03\x12Y\n\x08\x62igquery\x18\x02 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.Entity.CompatibilityStatus.CompatibilityB\x03\xe0\x41\x03\x1a=\n\rCompatibility\x12\x17\n\ncompatible\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x03\"4\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02:x\xea\x41u\n\x1e\x64\x61taplex.googleapis.com/Entity\x12Sprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}\"\xa1\x02\n\tPartition\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!dataplex.googleapis.com/Partition\x12\x16\n\x06values\x18\x02 \x03(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x08location\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x13\n\x04\x65tag\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x01:\x93\x01\xea\x41\x8f\x01\n!dataplex.googleapis.com/Partition\x12jprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}\"\xb7\x07\n\x06Schema\x12\x19\n\x0cuser_managed\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x41\n\x06\x66ields\x18\x02 \x03(\x0b\x32,.google.cloud.dataplex.v1.Schema.SchemaFieldB\x03\xe0\x41\x01\x12N\n\x10partition_fields\x18\x03 \x03(\x0b\x32/.google.cloud.dataplex.v1.Schema.PartitionFieldB\x03\xe0\x41\x01\x12M\n\x0fpartition_style\x18\x04 \x01(\x0e\x32/.google.cloud.dataplex.v1.Schema.PartitionStyleB\x03\xe0\x41\x01\x1a\xf1\x01\n\x0bSchemaField\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\x04type\x18\x03 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.TypeB\x03\xe0\x41\x02\x12\x38\n\x04mode\x18\x04 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.ModeB\x03\xe0\x41\x02\x12\x41\n\x06\x66ields\x18\n \x03(\x0b\x32,.google.cloud.dataplex.v1.Schema.SchemaFieldB\x03\xe0\x41\x01\x1a`\n\x0ePartitionField\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\x04type\x18\x02 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.TypeB\x06\xe0\x41\x02\xe0\x41\x05\"\xc9\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x42OOLEAN\x10\x01\x12\x08\n\x04\x42YTE\x10\x02\x12\t\n\x05INT16\x10\x03\x12\t\n\x05INT32\x10\x04\x12\t\n\x05INT64\x10\x05\x12\t\n\x05\x46LOAT\x10\x06\x12\n\n\x06\x44OUBLE\x10\x07\x12\x0b\n\x07\x44\x45\x43IMAL\x10\x08\x12\n\n\x06STRING\x10\t\x12\n\n\x06\x42INARY\x10\n\x12\r\n\tTIMESTAMP\x10\x0b\x12\x08\n\x04\x44\x41TE\x10\x0c\x12\x08\n\x04TIME\x10\r\x12\n\n\x06RECORD\x10\x0e\x12\x08\n\x04NULL\x10\x64\"F\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08REQUIRED\x10\x01\x12\x0c\n\x08NULLABLE\x10\x02\x12\x0c\n\x08REPEATED\x10\x03\"F\n\x0ePartitionStyle\x12\x1f\n\x1bPARTITION_STYLE_UNSPECIFIED\x10\x00\x12\x13\n\x0fHIVE_COMPATIBLE\x10\x01\"\xf4\x06\n\rStorageFormat\x12\x43\n\x06\x66ormat\x18\x01 \x01(\x0e\x32..google.cloud.dataplex.v1.StorageFormat.FormatB\x03\xe0\x41\x03\x12Z\n\x12\x63ompression_format\x18\x02 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.StorageFormat.CompressionFormatB\x03\xe0\x41\x01\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x03\x63sv\x18\n \x01(\x0b\x32\x32.google.cloud.dataplex.v1.StorageFormat.CsvOptionsB\x03\xe0\x41\x01H\x00\x12H\n\x04json\x18\x0b \x01(\x0b\x32\x33.google.cloud.dataplex.v1.StorageFormat.JsonOptionsB\x03\xe0\x41\x01H\x00\x12N\n\x07iceberg\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.StorageFormat.IcebergOptionsB\x03\xe0\x41\x01H\x00\x1ai\n\nCsvOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bheader_rows\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05quote\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x30\n\x0eIcebergOptions\x12\x1e\n\x11metadata_location\x18\x01 \x01(\tB\x03\xe0\x41\x01\"\xab\x01\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x0b\n\x07PARQUET\x10\x01\x12\x08\n\x04\x41VRO\x10\x02\x12\x07\n\x03ORC\x10\x03\x12\x07\n\x03\x43SV\x10\x64\x12\x08\n\x04JSON\x10\x65\x12\n\n\x05IMAGE\x10\xc8\x01\x12\n\n\x05\x41UDIO\x10\xc9\x01\x12\n\n\x05VIDEO\x10\xca\x01\x12\t\n\x04TEXT\x10\xcb\x01\x12\r\n\x08TFRECORD\x10\xcc\x01\x12\n\n\x05OTHER\x10\xe8\x07\x12\x0c\n\x07UNKNOWN\x10\xe9\x07\"L\n\x11\x43ompressionFormat\x12\"\n\x1e\x43OMPRESSION_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04GZIP\x10\x02\x12\t\n\x05\x42ZIP2\x10\x03\x42\t\n\x07options\"\x9a\x01\n\rStorageAccess\x12\x45\n\x04read\x18\x15 \x01(\x0e\x32\x32.google.cloud.dataplex.v1.StorageAccess.AccessModeB\x03\xe0\x41\x03\"B\n\nAccessMode\x12\x1b\n\x17\x41\x43\x43\x45SS_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44IRECT\x10\x01\x12\x0b\n\x07MANAGED\x10\x02*P\n\rStorageSystem\x12\x1e\n\x1aSTORAGE_SYSTEM_UNSPECIFIED\x10\x00\x12\x11\n\rCLOUD_STORAGE\x10\x01\x12\x0c\n\x08\x42IGQUERY\x10\x02\x32\x89\x0e\n\x0fMetadataService\x12\xbd\x01\n\x0c\x43reateEntity\x12-.google.cloud.dataplex.v1.CreateEntityRequest\x1a .google.cloud.dataplex.v1.Entity\"\\\xda\x41\rparent,entity\x82\xd3\xe4\x93\x02\x46\"*\x12\x12 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a metadata entity. Only supports full resource update. + # + # @overload update_entity(request, options = nil) + # Pass arguments to `update_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_entity(entity: nil, validate_only: nil) + # Pass arguments to `update_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] + # Required. Update description. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new + # + # # Call the update_entity method. + # result = client.update_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def update_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_entity.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.entity&.name + header_params["entity.name"] = request.entity.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_entity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :update_entity, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a metadata entity. + # + # @overload delete_entity(request, options = nil) + # Pass arguments to `delete_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_entity(name: nil, etag: nil) + # Pass arguments to `delete_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param etag [::String] + # Required. The etag associated with the entity, which can be retrieved with + # a [GetEntity][] request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new + # + # # Call the delete_entity method. + # result = client.delete_entity request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_entity.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_entity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :delete_entity, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a metadata entity. + # + # @overload get_entity(request, options = nil) + # Pass arguments to `get_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_entity(name: nil, view: nil) + # Pass arguments to `get_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + # @param view [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] + # Optional. Used to select the subset of entity information to return. + # Defaults to `BASIC`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntityRequest.new + # + # # Call the get_entity method. + # result = client.get_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def get_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_entity.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_entity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :get_entity, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List metadata entities in a zone. + # + # @overload list_entities(request, options = nil) + # Pass arguments to `list_entities` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntitiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_entities` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param view [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] + # Required. Specify the entity view to make a partial list request. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new + # + # # Call the list_entities method. + # result = client.list_entities request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. + # p item + # end + # + def list_entities request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntitiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_entities.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_entities.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_entities.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :list_entities, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @metadata_service_stub, :list_entities, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a metadata partition. + # + # @overload create_partition(request, options = nil) + # Pass arguments to `create_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreatePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_partition(parent: nil, partition: nil, validate_only: nil) + # Pass arguments to `create_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param partition [::Google::Cloud::Dataplex::V1::Partition, ::Hash] + # Required. Partition resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new + # + # # Call the create_partition method. + # result = client.create_partition request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + # p result + # + def create_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreatePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_partition.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_partition.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :create_partition, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a metadata partition. + # + # @overload delete_partition(request, options = nil) + # Pass arguments to `delete_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeletePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_partition(name: nil, etag: nil) + # Pass arguments to `delete_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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 etag [::String] + # Optional. The etag associated with the partition. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new + # + # # Call the delete_partition method. + # result = client.delete_partition request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeletePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_partition.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_partition.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :delete_partition, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a metadata partition of an entity. + # + # @overload get_partition(request, options = nil) + # Pass arguments to `get_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetPartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_partition(name: nil) + # Pass arguments to `get_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new + # + # # Call the get_partition method. + # result = client.get_partition request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + # p result + # + def get_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetPartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_partition.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_partition.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :get_partition, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List metadata partitions of an entity. + # + # @overload list_partitions(request, options = nil) + # Pass arguments to `list_partitions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListPartitionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_partitions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new + # + # # Call the list_partitions method. + # result = client.list_partitions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. + # p item + # end + # + def list_partitions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListPartitionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_partitions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_partitions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_partitions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :list_partitions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @metadata_service_stub, :list_partitions, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the MetadataService API. + # + # This class represents the configuration for MetadataService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::MetadataService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_entity to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::MetadataService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_entity.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_entity.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the MetadataService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entity + ## + # RPC-specific configuration for `update_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entity + ## + # RPC-specific configuration for `delete_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entity + ## + # RPC-specific configuration for `get_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entity + ## + # RPC-specific configuration for `list_entities` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entities + ## + # RPC-specific configuration for `create_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :create_partition + ## + # RPC-specific configuration for `delete_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_partition + ## + # RPC-specific configuration for `get_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :get_partition + ## + # RPC-specific configuration for `list_partitions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_partitions + + # @private + def initialize parent_rpcs = nil + create_entity_config = parent_rpcs.create_entity if parent_rpcs.respond_to? :create_entity + @create_entity = ::Gapic::Config::Method.new create_entity_config + update_entity_config = parent_rpcs.update_entity if parent_rpcs.respond_to? :update_entity + @update_entity = ::Gapic::Config::Method.new update_entity_config + delete_entity_config = parent_rpcs.delete_entity if parent_rpcs.respond_to? :delete_entity + @delete_entity = ::Gapic::Config::Method.new delete_entity_config + get_entity_config = parent_rpcs.get_entity if parent_rpcs.respond_to? :get_entity + @get_entity = ::Gapic::Config::Method.new get_entity_config + list_entities_config = parent_rpcs.list_entities if parent_rpcs.respond_to? :list_entities + @list_entities = ::Gapic::Config::Method.new list_entities_config + create_partition_config = parent_rpcs.create_partition if parent_rpcs.respond_to? :create_partition + @create_partition = ::Gapic::Config::Method.new create_partition_config + delete_partition_config = parent_rpcs.delete_partition if parent_rpcs.respond_to? :delete_partition + @delete_partition = ::Gapic::Config::Method.new delete_partition_config + get_partition_config = parent_rpcs.get_partition if parent_rpcs.respond_to? :get_partition + @get_partition = ::Gapic::Config::Method.new get_partition_config + list_partitions_config = parent_rpcs.list_partitions if parent_rpcs.respond_to? :list_partitions + @list_partitions = ::Gapic::Config::Method.new list_partitions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb new file mode 100644 index 000000000000..ebb897d11c17 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module MetadataService + # Credentials for the MetadataService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb new file mode 100644 index 000000000000..f17baadf07d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb @@ -0,0 +1,102 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + module MetadataService + # Path helper methods for the MetadataService API. + module Paths + ## + # Create a fully-qualified Entity resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # @param entity [String] + # + # @return [::String] + def entity_path project:, location:, lake:, zone:, entity: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}" + end + + ## + # Create a fully-qualified Partition resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # @param entity [String] + # @param partition [String] + # + # @return [::String] + def partition_path project:, location:, lake:, zone:, entity:, partition: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + raise ::ArgumentError, "entity cannot contain /" if entity.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}/partitions/#{partition}" + end + + ## + # Create a fully-qualified Zone resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # + # @return [::String] + def zone_path project:, location:, lake:, zone: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb new file mode 100644 index 000000000000..27a710ff906d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/metadata_service/credentials" +require "google/cloud/dataplex/v1/metadata_service/paths" +require "google/cloud/dataplex/v1/metadata_service/rest/client" + +module Google + module Cloud + module Dataplex + module V1 + ## + # Metadata service manages metadata resources such as tables, filesets and + # partitions. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/metadata_service/rest" + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + module MetadataService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/metadata_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb new file mode 100644 index 000000000000..ae31aa2694a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb @@ -0,0 +1,1233 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/dataplex/v1/metadata_pb" +require "google/cloud/dataplex/v1/metadata_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module MetadataService + module Rest + ## + # REST client for the MetadataService service. + # + # Metadata service manages metadata resources such as tables, filesets and + # partitions. + # + class Client + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :metadata_service_stub + + ## + # Configure the MetadataService Client class. + # + # See {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all MetadataService clients + # ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_entity.timeout = 60.0 + + default_config.rpcs.update_entity.timeout = 60.0 + + default_config.rpcs.delete_entity.timeout = 60.0 + + default_config.rpcs.get_entity.timeout = 60.0 + default_config.rpcs.get_entity.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_entities.timeout = 60.0 + default_config.rpcs.list_entities.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_partition.timeout = 60.0 + + default_config.rpcs.delete_partition.timeout = 60.0 + + default_config.rpcs.get_partition.timeout = 60.0 + default_config.rpcs.get_partition.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_partitions.timeout = 60.0 + default_config.rpcs.list_partitions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the MetadataService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @metadata_service_stub.universe_domain + end + + ## + # Create a new MetadataService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the MetadataService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @metadata_service_stub = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @metadata_service_stub.endpoint + config.universe_domain = @metadata_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @metadata_service_stub.endpoint + config.universe_domain = @metadata_service_stub.universe_domain + config.bindings_override = @config.bindings_override + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + # Service calls + + ## + # Create a metadata entity. + # + # @overload create_entity(request, options = nil) + # Pass arguments to `create_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_entity(parent: nil, entity: nil, validate_only: nil) + # Pass arguments to `create_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] + # Required. Entity resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntityRequest.new + # + # # Call the create_entity method. + # result = client.create_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def create_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_entity.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_entity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.create_entity request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a metadata entity. Only supports full resource update. + # + # @overload update_entity(request, options = nil) + # Pass arguments to `update_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_entity(entity: nil, validate_only: nil) + # Pass arguments to `update_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] + # Required. Update description. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new + # + # # Call the update_entity method. + # result = client.update_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def update_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_entity.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_entity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.update_entity request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a metadata entity. + # + # @overload delete_entity(request, options = nil) + # Pass arguments to `delete_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_entity(name: nil, etag: nil) + # Pass arguments to `delete_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param etag [::String] + # Required. The etag associated with the entity, which can be retrieved with + # a [GetEntity][] request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new + # + # # Call the delete_entity method. + # result = client.delete_entity request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_entity.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_entity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.delete_entity request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a metadata entity. + # + # @overload get_entity(request, options = nil) + # Pass arguments to `get_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_entity(name: nil, view: nil) + # Pass arguments to `get_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + # @param view [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] + # Optional. Used to select the subset of entity information to return. + # Defaults to `BASIC`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntityRequest.new + # + # # Call the get_entity method. + # result = client.get_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def get_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_entity.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_entity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.get_entity request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List metadata entities in a zone. + # + # @overload list_entities(request, options = nil) + # Pass arguments to `list_entities` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntitiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_entities` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param view [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] + # Required. Specify the entity view to make a partial list request. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new + # + # # Call the list_entities method. + # result = client.list_entities request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. + # p item + # end + # + def list_entities request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntitiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_entities.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_entities.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_entities.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.list_entities request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_entities, "entities", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a metadata partition. + # + # @overload create_partition(request, options = nil) + # Pass arguments to `create_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreatePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_partition(parent: nil, partition: nil, validate_only: nil) + # Pass arguments to `create_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param partition [::Google::Cloud::Dataplex::V1::Partition, ::Hash] + # Required. Partition resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new + # + # # Call the create_partition method. + # result = client.create_partition request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + # p result + # + def create_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreatePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_partition.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_partition.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.create_partition request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a metadata partition. + # + # @overload delete_partition(request, options = nil) + # Pass arguments to `delete_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeletePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_partition(name: nil, etag: nil) + # Pass arguments to `delete_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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 etag [::String] + # Optional. The etag associated with the partition. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new + # + # # Call the delete_partition method. + # result = client.delete_partition request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeletePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_partition.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_partition.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.delete_partition request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a metadata partition of an entity. + # + # @overload get_partition(request, options = nil) + # Pass arguments to `get_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetPartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_partition(name: nil) + # Pass arguments to `get_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new + # + # # Call the get_partition method. + # result = client.get_partition request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + # p result + # + def get_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetPartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_partition.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_partition.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.get_partition request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List metadata partitions of an entity. + # + # @overload list_partitions(request, options = nil) + # Pass arguments to `list_partitions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListPartitionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_partitions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new + # + # # Call the list_partitions method. + # result = client.list_partitions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. + # p item + # end + # + def list_partitions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListPartitionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_partitions.metadata.to_h + + # Set x-goog-api-client and x-goog-user-project headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_partitions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_partitions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.list_partitions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_partitions, "partitions", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the MetadataService REST API. + # + # This class represents the configuration for MetadataService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_entity to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_entity.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_entity.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataplex.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the MetadataService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entity + ## + # RPC-specific configuration for `update_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entity + ## + # RPC-specific configuration for `delete_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entity + ## + # RPC-specific configuration for `get_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entity + ## + # RPC-specific configuration for `list_entities` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entities + ## + # RPC-specific configuration for `create_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :create_partition + ## + # RPC-specific configuration for `delete_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_partition + ## + # RPC-specific configuration for `get_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :get_partition + ## + # RPC-specific configuration for `list_partitions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_partitions + + # @private + def initialize parent_rpcs = nil + create_entity_config = parent_rpcs.create_entity if parent_rpcs.respond_to? :create_entity + @create_entity = ::Gapic::Config::Method.new create_entity_config + update_entity_config = parent_rpcs.update_entity if parent_rpcs.respond_to? :update_entity + @update_entity = ::Gapic::Config::Method.new update_entity_config + delete_entity_config = parent_rpcs.delete_entity if parent_rpcs.respond_to? :delete_entity + @delete_entity = ::Gapic::Config::Method.new delete_entity_config + get_entity_config = parent_rpcs.get_entity if parent_rpcs.respond_to? :get_entity + @get_entity = ::Gapic::Config::Method.new get_entity_config + list_entities_config = parent_rpcs.list_entities if parent_rpcs.respond_to? :list_entities + @list_entities = ::Gapic::Config::Method.new list_entities_config + create_partition_config = parent_rpcs.create_partition if parent_rpcs.respond_to? :create_partition + @create_partition = ::Gapic::Config::Method.new create_partition_config + delete_partition_config = parent_rpcs.delete_partition if parent_rpcs.respond_to? :delete_partition + @delete_partition = ::Gapic::Config::Method.new delete_partition_config + get_partition_config = parent_rpcs.get_partition if parent_rpcs.respond_to? :get_partition + @get_partition = ::Gapic::Config::Method.new get_partition_config + list_partitions_config = parent_rpcs.list_partitions if parent_rpcs.respond_to? :list_partitions + @list_partitions = ::Gapic::Config::Method.new list_partitions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb new file mode 100644 index 000000000000..6c1684ce4a3c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb @@ -0,0 +1,603 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/metadata_pb" + +module Google + module Cloud + module Dataplex + module V1 + module MetadataService + module Rest + ## + # REST service stub for the MetadataService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the create_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # A result object deserialized from the server's reply + def create_entity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_entity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entity.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # A result object deserialized from the server's reply + def update_entity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_entity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entity.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_entity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_entity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # A result object deserialized from the server's reply + def get_entity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_entity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entity.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_entities REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntitiesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntitiesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntitiesResponse] + # A result object deserialized from the server's reply + def list_entities request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_entities_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreatePartitionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # A result object deserialized from the server's reply + def create_partition request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_partition_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Partition.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeletePartitionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_partition request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_partition_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetPartitionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # A result object deserialized from the server's reply + def get_partition request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_partition_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Partition.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_partitions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListPartitionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListPartitionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListPartitionsResponse] + # A result object deserialized from the server's reply + def list_partitions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_partitions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the create_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_entity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/entities", + body: "entity", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_entity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1/{entity.name}", + body: "entity", + matches: [ + ["entity.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_entity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_entity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_entities REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntitiesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_entities_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/entities", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreatePartitionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_partition_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/partitions", + body: "partition", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeletePartitionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_partition_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetPartitionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_partition_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_partitions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListPartitionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_partitions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/partitions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb new file mode 100644 index 000000000000..216f643b2c64 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/metadata.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# + +require 'grpc' +require 'google/cloud/dataplex/v1/metadata_pb' + +module Google + module Cloud + module Dataplex + module V1 + module MetadataService + # Metadata service manages metadata resources such as tables, filesets and + # partitions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.MetadataService' + + # Create a metadata entity. + rpc :CreateEntity, ::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Google::Cloud::Dataplex::V1::Entity + # Update a metadata entity. Only supports full resource update. + rpc :UpdateEntity, ::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Google::Cloud::Dataplex::V1::Entity + # Delete a metadata entity. + rpc :DeleteEntity, ::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Google::Protobuf::Empty + # Get a metadata entity. + rpc :GetEntity, ::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Google::Cloud::Dataplex::V1::Entity + # List metadata entities in a zone. + rpc :ListEntities, ::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Google::Cloud::Dataplex::V1::ListEntitiesResponse + # Create a metadata partition. + rpc :CreatePartition, ::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Google::Cloud::Dataplex::V1::Partition + # Delete a metadata partition. + rpc :DeletePartition, ::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Google::Protobuf::Empty + # Get a metadata partition of an entity. + rpc :GetPartition, ::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Google::Cloud::Dataplex::V1::Partition + # List metadata partitions of an entity. + rpc :ListPartitions, ::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Google::Cloud::Dataplex::V1::ListPartitionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb new file mode 100644 index 000000000000..49ecd409bebe --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/processing.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n)google/cloud/dataplex/v1/processing.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xbd\x01\n\x07Trigger\x12?\n\ton_demand\x18\x64 \x01(\x0b\x32*.google.cloud.dataplex.v1.Trigger.OnDemandH\x00\x12>\n\x08schedule\x18\x65 \x01(\x0b\x32*.google.cloud.dataplex.v1.Trigger.ScheduleH\x00\x1a\n\n\x08OnDemand\x1a\x1d\n\x08Schedule\x12\x11\n\x04\x63ron\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x06\n\x04mode\"i\n\nDataSource\x12\x38\n\x06\x65ntity\x18\x64 \x01(\tB&\xe0\x41\x05\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/EntityH\x00\x12\x17\n\x08resource\x18\x65 \x01(\tB\x03\xe0\x41\x05H\x00\x42\x08\n\x06source\"\xaf\x01\n\x0bScannedData\x12S\n\x11incremental_field\x18\x01 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.ScannedData.IncrementalFieldH\x00\x1a=\n\x10IncrementalField\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\r\n\x05start\x18\x02 \x01(\t\x12\x0b\n\x03\x65nd\x18\x03 \x01(\tB\x0c\n\ndata_rangeBk\n\x1c\x63om.google.cloud.dataplex.v1B\x0fProcessingProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger").msgclass + Trigger::OnDemand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger.OnDemand").msgclass + Trigger::Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger.Schedule").msgclass + DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataSource").msgclass + ScannedData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ScannedData").msgclass + ScannedData::IncrementalField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ScannedData.IncrementalField").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb new file mode 100644 index 000000000000..9588f77a6f82 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n(google/cloud/dataplex/v1/resources.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfa\x07\n\x04Lake\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x06 \x03(\x0b\x32*.google.cloud.dataplex.v1.Lake.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x1c\n\x0fservice_account\x18\t \x01(\tB\x03\xe0\x41\x03\x12@\n\tmetastore\x18\x66 \x01(\x0b\x32(.google.cloud.dataplex.v1.Lake.MetastoreB\x03\xe0\x41\x01\x12@\n\x0c\x61sset_status\x18g \x01(\x0b\x32%.google.cloud.dataplex.v1.AssetStatusB\x03\xe0\x41\x03\x12M\n\x10metastore_status\x18h \x01(\x0b\x32..google.cloud.dataplex.v1.Lake.MetastoreStatusB\x03\xe0\x41\x03\x1a!\n\tMetastore\x12\x14\n\x07service\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xf8\x01\n\x0fMetastoreStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Lake.MetastoreStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x65ndpoint\x18\x04 \x01(\t\"L\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:W\xea\x41T\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x34projects/{project}/locations/{location}/lakes/{lake}\"~\n\x0b\x41ssetStatus\x12/\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\ractive_assets\x18\x02 \x01(\x05\x12\'\n\x1fsecurity_policy_applying_assets\x18\x03 \x01(\x05\"\xf4\x0b\n\x04Zone\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x06 \x03(\x0b\x32*.google.cloud.dataplex.v1.Zone.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x39\n\x04type\x18\t \x01(\x0e\x32#.google.cloud.dataplex.v1.Zone.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12I\n\x0e\x64iscovery_spec\x18g \x01(\x0b\x32,.google.cloud.dataplex.v1.Zone.DiscoverySpecB\x03\xe0\x41\x01\x12G\n\rresource_spec\x18h \x01(\x0b\x32+.google.cloud.dataplex.v1.Zone.ResourceSpecB\x03\xe0\x41\x02\x12@\n\x0c\x61sset_status\x18i \x01(\x0b\x32%.google.cloud.dataplex.v1.AssetStatusB\x03\xe0\x41\x03\x1a\xbb\x01\n\x0cResourceSpec\x12W\n\rlocation_type\x18\x01 \x01(\x0e\x32\x38.google.cloud.dataplex.v1.Zone.ResourceSpec.LocationTypeB\x06\xe0\x41\x02\xe0\x41\x05\"R\n\x0cLocationType\x12\x1d\n\x19LOCATION_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSINGLE_REGION\x10\x01\x12\x10\n\x0cMULTI_REGION\x10\x02\x1a\xf6\x03\n\rDiscoverySpec\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1d\n\x10include_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12Q\n\x0b\x63sv_options\x18\x04 \x01(\x0b\x32\x37.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptionsB\x03\xe0\x41\x01\x12S\n\x0cjson_options\x18\x05 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptionsB\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\n \x01(\tB\x03\xe0\x41\x01H\x00\x1az\n\nCsvOptions\x12\x18\n\x0bheader_rows\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\t\n\x07trigger\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03RAW\x10\x01\x12\x0b\n\x07\x43URATED\x10\x02:d\xea\x41\x61\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x41projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}\"\xab\x11\n\x06\x41\x63tion\x12;\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32).google.cloud.dataplex.v1.Action.Category\x12\r\n\x05issue\x18\x02 \x01(\t\x12/\n\x0b\x64\x65tect_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x04name\x18\x05 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Action\x12\x32\n\x04lake\x18\x06 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x32\n\x04zone\x18\x07 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x34\n\x05\x61sset\x18\x08 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x16\n\x0e\x64\x61ta_locations\x18\t \x03(\t\x12Q\n\x13invalid_data_format\x18\n \x01(\x0b\x32\x32.google.cloud.dataplex.v1.Action.InvalidDataFormatH\x00\x12[\n\x18incompatible_data_schema\x18\x0b \x01(\x0b\x32\x37.google.cloud.dataplex.v1.Action.IncompatibleDataSchemaH\x00\x12W\n\x16invalid_data_partition\x18\x0c \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Action.InvalidDataPartitionH\x00\x12\x44\n\x0cmissing_data\x18\r \x01(\x0b\x32,.google.cloud.dataplex.v1.Action.MissingDataH\x00\x12L\n\x10missing_resource\x18\x0e \x01(\x0b\x32\x30.google.cloud.dataplex.v1.Action.MissingResourceH\x00\x12V\n\x15unauthorized_resource\x18\x0f \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Action.UnauthorizedResourceH\x00\x12\x62\n\x1c\x66\x61iled_security_policy_apply\x18\x15 \x01(\x0b\x32:.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApplyH\x00\x12]\n\x19invalid_data_organization\x18\x16 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Action.InvalidDataOrganizationH\x00\x1a\x11\n\x0fMissingResource\x1a\x16\n\x14UnauthorizedResource\x1a*\n\x19\x46\x61iledSecurityPolicyApply\x12\r\n\x05\x61sset\x18\x01 \x01(\t\x1a`\n\x11InvalidDataFormat\x12\x1e\n\x16sampled_data_locations\x18\x01 \x03(\t\x12\x17\n\x0f\x65xpected_format\x18\x02 \x01(\t\x12\x12\n\nnew_format\x18\x03 \x01(\t\x1a\xa0\x02\n\x16IncompatibleDataSchema\x12\r\n\x05table\x18\x01 \x01(\t\x12\x17\n\x0f\x65xisting_schema\x18\x02 \x01(\t\x12\x12\n\nnew_schema\x18\x03 \x01(\t\x12\x1e\n\x16sampled_data_locations\x18\x04 \x03(\t\x12[\n\rschema_change\x18\x05 \x01(\x0e\x32\x44.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange\"M\n\x0cSchemaChange\x12\x1d\n\x19SCHEMA_CHANGE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINCOMPATIBLE\x10\x01\x12\x0c\n\x08MODIFIED\x10\x02\x1a\xe1\x01\n\x14InvalidDataPartition\x12\x64\n\x12\x65xpected_structure\x18\x01 \x01(\x0e\x32H.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure\"c\n\x12PartitionStructure\x12#\n\x1fPARTITION_STRUCTURE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43ONSISTENT_KEYS\x10\x01\x12\x13\n\x0fHIVE_STYLE_KEYS\x10\x02\x1a\r\n\x0bMissingData\x1a\x19\n\x17InvalidDataOrganization\"f\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x17\n\x13RESOURCE_MANAGEMENT\x10\x01\x12\x13\n\x0fSECURITY_POLICY\x10\x02\x12\x12\n\x0e\x44\x41TA_DISCOVERY\x10\x03:\xa2\x02\xea\x41\x9e\x02\n\x1e\x64\x61taplex.googleapis.com/Action\x12\x45projects/{project}/locations/{location}/lakes/{lake}/actions/{action}\x12Rprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}\x12\x61projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}B\t\n\x07\x64\x65tails\"\xa4\x15\n\x05\x41sset\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x06labels\x18\x06 \x03(\x0b\x32+.google.cloud.dataplex.v1.Asset.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12H\n\rresource_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.Asset.ResourceSpecB\x03\xe0\x41\x02\x12L\n\x0fresource_status\x18\x65 \x01(\x0b\x32..google.cloud.dataplex.v1.Asset.ResourceStatusB\x03\xe0\x41\x03\x12L\n\x0fsecurity_status\x18g \x01(\x0b\x32..google.cloud.dataplex.v1.Asset.SecurityStatusB\x03\xe0\x41\x03\x12J\n\x0e\x64iscovery_spec\x18j \x01(\x0b\x32-.google.cloud.dataplex.v1.Asset.DiscoverySpecB\x03\xe0\x41\x01\x12N\n\x10\x64iscovery_status\x18k \x01(\x0b\x32/.google.cloud.dataplex.v1.Asset.DiscoveryStatusB\x03\xe0\x41\x03\x1a\xdb\x01\n\x0eSecurityStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Asset.SecurityStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"B\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x41PPLYING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x1a\xf8\x03\n\rDiscoverySpec\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10include_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12R\n\x0b\x63sv_options\x18\x04 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptionsB\x03\xe0\x41\x01\x12T\n\x0cjson_options\x18\x05 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptionsB\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\n \x01(\tB\x03\xe0\x41\x01H\x00\x1az\n\nCsvOptions\x12\x18\n\x0bheader_rows\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\t\n\x07trigger\x1a\xce\x02\n\x0cResourceSpec\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12G\n\x04type\x18\x02 \x01(\x0e\x32\x31.google.cloud.dataplex.v1.Asset.ResourceSpec.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12V\n\x10read_access_mode\x18\x05 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessModeB\x03\xe0\x41\x01\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTORAGE_BUCKET\x10\x01\x12\x14\n\x10\x42IGQUERY_DATASET\x10\x02\"B\n\nAccessMode\x12\x1b\n\x17\x41\x43\x43\x45SS_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44IRECT\x10\x01\x12\x0b\n\x07MANAGED\x10\x02\x1a\xf3\x01\n\x0eResourceStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Asset.ResourceStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12$\n\x17managed_access_identity\x18\x04 \x01(\tB\x03\xe0\x41\x03\"4\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x1a\xf4\x03\n\x0f\x44iscoveryStatus\x12\x44\n\x05state\x18\x01 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_run_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x05stats\x18\x06 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats\x12\x34\n\x11last_run_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x1aP\n\x05Stats\x12\x12\n\ndata_items\x18\x01 \x01(\x03\x12\x11\n\tdata_size\x18\x02 \x01(\x03\x12\x0e\n\x06tables\x18\x03 \x01(\x03\x12\x10\n\x08\x66ilesets\x18\x04 \x01(\x03\"X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\x0c\n\x08\x44ISABLED\x10\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n\x1d\x64\x61taplex.googleapis.com/Asset\x12Pprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}*[\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x13\n\x0f\x41\x43TION_REQUIRED\x10\x04\x42j\n\x1c\x63om.google.cloud.dataplex.v1B\x0eResourcesProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + Lake = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake").msgclass + Lake::Metastore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.Metastore").msgclass + Lake::MetastoreStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.MetastoreStatus").msgclass + Lake::MetastoreStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.MetastoreStatus.State").enummodule + AssetStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AssetStatus").msgclass + Zone = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone").msgclass + Zone::ResourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.ResourceSpec").msgclass + Zone::ResourceSpec::LocationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType").enummodule + Zone::DiscoverySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec").msgclass + Zone::DiscoverySpec::CsvOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions").msgclass + Zone::DiscoverySpec::JsonOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions").msgclass + Zone::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.Type").enummodule + Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action").msgclass + Action::MissingResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.MissingResource").msgclass + Action::UnauthorizedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.UnauthorizedResource").msgclass + Action::FailedSecurityPolicyApply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply").msgclass + Action::InvalidDataFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataFormat").msgclass + Action::IncompatibleDataSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.IncompatibleDataSchema").msgclass + Action::IncompatibleDataSchema::SchemaChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange").enummodule + Action::InvalidDataPartition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataPartition").msgclass + Action::InvalidDataPartition::PartitionStructure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure").enummodule + Action::MissingData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.MissingData").msgclass + Action::InvalidDataOrganization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataOrganization").msgclass + Action::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.Category").enummodule + Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset").msgclass + Asset::SecurityStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.SecurityStatus").msgclass + Asset::SecurityStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.SecurityStatus.State").enummodule + Asset::DiscoverySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec").msgclass + Asset::DiscoverySpec::CsvOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions").msgclass + Asset::DiscoverySpec::JsonOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions").msgclass + Asset::ResourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec").msgclass + Asset::ResourceSpec::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec.Type").enummodule + Asset::ResourceSpec::AccessMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode").enummodule + Asset::ResourceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceStatus").msgclass + Asset::ResourceStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceStatus.State").enummodule + Asset::DiscoveryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus").msgclass + Asset::DiscoveryStatus::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats").msgclass + Asset::DiscoveryStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus.State").enummodule + State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb new file mode 100644 index 000000000000..ef6ed7dc41ff --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/dataplex/v1/dataplex_service/rest" +require "google/cloud/dataplex/v1/catalog_service/rest" +require "google/cloud/dataplex/v1/content_service/rest" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest" +require "google/cloud/dataplex/v1/data_scan_service/rest" +require "google/cloud/dataplex/v1/metadata_service/rest" +require "google/cloud/dataplex/v1/bindings_override" +require "google/cloud/dataplex/v1/version" + +module Google + module Cloud + module Dataplex + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/dataplex/v1/rest" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb new file mode 100644 index 000000000000..0afab5d5d3ac --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/security.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\'google/cloud/dataplex/v1/security.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\"U\n\x12ResourceAccessSpec\x12\x14\n\x07readers\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x14\n\x07writers\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06owners\x18\x03 \x03(\tB\x03\xe0\x41\x01\"&\n\x0e\x44\x61taAccessSpec\x12\x14\n\x07readers\x18\x01 \x03(\tB\x03\xe0\x41\x01\x42i\n\x1c\x63om.google.cloud.dataplex.v1B\rSecurityProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + ResourceAccessSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ResourceAccessSpec").msgclass + DataAccessSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAccessSpec").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb new file mode 100644 index 000000000000..f7926ab78db0 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/analyze_pb' +require 'google/cloud/dataplex/v1/resources_pb' +require 'google/cloud/dataplex/v1/tasks_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/dataplex/v1/service.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/analyze.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a$google/cloud/dataplex/v1/tasks.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x01\n\x11\x43reateLakeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x14\n\x07lake_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x04lake\x18\x03 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.LakeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x11UpdateLakeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x31\n\x04lake\x18\x02 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.LakeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x11\x44\x65leteLakeRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\"\xaa\x01\n\x10ListLakesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x11ListLakesResponse\x12-\n\x05lakes\x18\x01 \x03(\x0b\x32\x1e.google.cloud.dataplex.v1.Lake\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"\x7f\n\x16ListLakeActionsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"a\n\x13ListActionsResponse\x12\x31\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32 .google.cloud.dataplex.v1.Action\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"D\n\x0eGetLakeRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\"\xae\x01\n\x11\x43reateZoneRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x14\n\x07zone_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x04zone\x18\x03 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.ZoneB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x11UpdateZoneRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x31\n\x04zone\x18\x02 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.ZoneB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x11\x44\x65leteZoneRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\"\xa5\x01\n\x10ListZonesRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"[\n\x11ListZonesResponse\x12-\n\x05zones\x18\x01 \x03(\x0b\x32\x1e.google.cloud.dataplex.v1.Zone\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x7f\n\x16ListZoneActionsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"D\n\x0eGetZoneRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\"\xb2\x01\n\x12\x43reateAssetRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x15\n\x08\x61sset_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x05\x61sset\x18\x03 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.AssetB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x9b\x01\n\x12UpdateAssetRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x33\n\x05\x61sset\x18\x02 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.AssetB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"I\n\x12\x44\x65leteAssetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\"\xa6\x01\n\x11ListAssetsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"^\n\x12ListAssetsResponse\x12/\n\x06\x61ssets\x18\x01 \x03(\x0b\x32\x1f.google.cloud.dataplex.v1.Asset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x81\x01\n\x17ListAssetActionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"F\n\x0fGetAssetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xae\x01\n\x11\x43reateTaskRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x14\n\x07task_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x04task\x18\x03 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.TaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x11UpdateTaskRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x31\n\x04task\x18\x02 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.TaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x11\x44\x65leteTaskRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\"\xa5\x01\n\x10ListTasksRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x11ListTasksResponse\x12-\n\x05tasks\x18\x01 \x03(\x0b\x32\x1e.google.cloud.dataplex.v1.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"D\n\x0eGetTaskRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\"B\n\rGetJobRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x64\x61taplex.googleapis.com/Job\"\xb2\x02\n\x0eRunTaskRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.RunTaskRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x45\n\x04\x61rgs\x18\x04 \x03(\x0b\x32\x32.google.cloud.dataplex.v1.RunTaskRequest.ArgsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"=\n\x0fRunTaskResponse\x12*\n\x03job\x18\x01 \x01(\x0b\x32\x1d.google.cloud.dataplex.v1.Job\"x\n\x0fListJobsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"X\n\x10ListJobsResponse\x12+\n\x04jobs\x18\x01 \x03(\x0b\x32\x1d.google.cloud.dataplex.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"E\n\x10\x43\x61ncelJobRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x64\x61taplex.googleapis.com/Job\"\xca\x01\n\x18\x43reateEnvironmentRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x1b\n\x0e\x65nvironment_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0b\x65nvironment\x18\x03 \x01(\x0b\x32%.google.cloud.dataplex.v1.EnvironmentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xad\x01\n\x18UpdateEnvironmentRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12?\n\x0b\x65nvironment\x18\x02 \x01(\x0b\x32%.google.cloud.dataplex.v1.EnvironmentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"U\n\x18\x44\x65leteEnvironmentRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/Environment\"\xac\x01\n\x17ListEnvironmentsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"p\n\x18ListEnvironmentsResponse\x12;\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32%.google.cloud.dataplex.v1.Environment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x15GetEnvironmentRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/Environment\"\x98\x01\n\x13ListSessionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/Environment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"d\n\x14ListSessionsResponse\x12\x33\n\x08sessions\x18\x01 \x03(\x0b\x32!.google.cloud.dataplex.v1.Session\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xac\x32\n\x0f\x44\x61taplexService\x12\xc3\x01\n\nCreateLake\x12+.google.cloud.dataplex.v1.CreateLakeRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41\x19\n\x04Lake\x12\x11OperationMetadata\xda\x41\x13parent,lake,lake_id\x82\xd3\xe4\x93\x02\x31\")/v1/{parent=projects/*/locations/*}/lakes:\x04lake\x12\xc5\x01\n\nUpdateLake\x12+.google.cloud.dataplex.v1.UpdateLakeRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41\x19\n\x04Lake\x12\x11OperationMetadata\xda\x41\x10lake,update_mask\x82\xd3\xe4\x93\x02\x36\x32./v1/{lake.name=projects/*/locations/*/lakes/*}:\x04lake\x12\xbf\x01\n\nDeleteLake\x12+.google.cloud.dataplex.v1.DeleteLakeRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02+*)/v1/{name=projects/*/locations/*/lakes/*}\x12\xa0\x01\n\tListLakes\x12*.google.cloud.dataplex.v1.ListLakesRequest\x1a+.google.cloud.dataplex.v1.ListLakesResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/v1/{parent=projects/*/locations/*}/lakes\x12\x8d\x01\n\x07GetLake\x12(.google.cloud.dataplex.v1.GetLakeRequest\x1a\x1e.google.cloud.dataplex.v1.Lake\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/v1/{name=projects/*/locations/*/lakes/*}\x12\xb8\x01\n\x0fListLakeActions\x12\x30.google.cloud.dataplex.v1.ListLakeActionsRequest\x1a-.google.cloud.dataplex.v1.ListActionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*/lakes/*}/actions\x12\xcb\x01\n\nCreateZone\x12+.google.cloud.dataplex.v1.CreateZoneRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41\x19\n\x04Zone\x12\x11OperationMetadata\xda\x41\x13parent,zone,zone_id\x82\xd3\xe4\x93\x02\x39\"1/v1/{parent=projects/*/locations/*/lakes/*}/zones:\x04zone\x12\xcd\x01\n\nUpdateZone\x12+.google.cloud.dataplex.v1.UpdateZoneRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x19\n\x04Zone\x12\x11OperationMetadata\xda\x41\x10zone,update_mask\x82\xd3\xe4\x93\x02>26/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}:\x04zone\x12\xc7\x01\n\nDeleteZone\x12+.google.cloud.dataplex.v1.DeleteZoneRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/lakes/*/zones/*}\x12\xa8\x01\n\tListZones\x12*.google.cloud.dataplex.v1.ListZonesRequest\x1a+.google.cloud.dataplex.v1.ListZonesResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*/lakes/*}/zones\x12\x95\x01\n\x07GetZone\x12(.google.cloud.dataplex.v1.GetZoneRequest\x1a\x1e.google.cloud.dataplex.v1.Zone\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/lakes/*/zones/*}\x12\xc0\x01\n\x0fListZoneActions\x12\x30.google.cloud.dataplex.v1.ListZoneActionsRequest\x1a-.google.cloud.dataplex.v1.ListActionsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions\x12\xda\x01\n\x0b\x43reateAsset\x12,.google.cloud.dataplex.v1.CreateAssetRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x1a\n\x05\x41sset\x12\x11OperationMetadata\xda\x41\x15parent,asset,asset_id\x82\xd3\xe4\x93\x02\x43\":/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets:\x05\x61sset\x12\xdd\x01\n\x0bUpdateAsset\x12,.google.cloud.dataplex.v1.UpdateAssetRequest\x1a\x1d.google.longrunning.Operation\"\x80\x01\xca\x41\x1a\n\x05\x41sset\x12\x11OperationMetadata\xda\x41\x11\x61sset,update_mask\x82\xd3\xe4\x93\x02I2@/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}:\x05\x61sset\x12\xd2\x01\n\x0b\x44\x65leteAsset\x12,.google.cloud.dataplex.v1.DeleteAssetRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}\x12\xb4\x01\n\nListAssets\x12+.google.cloud.dataplex.v1.ListAssetsRequest\x1a,.google.cloud.dataplex.v1.ListAssetsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets\x12\xa1\x01\n\x08GetAsset\x12).google.cloud.dataplex.v1.GetAssetRequest\x1a\x1f.google.cloud.dataplex.v1.Asset\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}\x12\xcb\x01\n\x10ListAssetActions\x12\x31.google.cloud.dataplex.v1.ListAssetActionsRequest\x1a-.google.cloud.dataplex.v1.ListActionsResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions\x12\xcb\x01\n\nCreateTask\x12+.google.cloud.dataplex.v1.CreateTaskRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41\x19\n\x04Task\x12\x11OperationMetadata\xda\x41\x13parent,task,task_id\x82\xd3\xe4\x93\x02\x39\"1/v1/{parent=projects/*/locations/*/lakes/*}/tasks:\x04task\x12\xcd\x01\n\nUpdateTask\x12+.google.cloud.dataplex.v1.UpdateTaskRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x19\n\x04Task\x12\x11OperationMetadata\xda\x41\x10task,update_mask\x82\xd3\xe4\x93\x02>26/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}:\x04task\x12\xc7\x01\n\nDeleteTask\x12+.google.cloud.dataplex.v1.DeleteTaskRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/lakes/*/tasks/*}\x12\xa8\x01\n\tListTasks\x12*.google.cloud.dataplex.v1.ListTasksRequest\x1a+.google.cloud.dataplex.v1.ListTasksResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*/lakes/*}/tasks\x12\x95\x01\n\x07GetTask\x12(.google.cloud.dataplex.v1.GetTaskRequest\x1a\x1e.google.cloud.dataplex.v1.Task\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/lakes/*/tasks/*}\x12\xac\x01\n\x08ListJobs\x12).google.cloud.dataplex.v1.ListJobsRequest\x1a*.google.cloud.dataplex.v1.ListJobsResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs\x12\xa7\x01\n\x07RunTask\x12(.google.cloud.dataplex.v1.RunTaskRequest\x1a).google.cloud.dataplex.v1.RunTaskResponse\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run:\x01*\x12\x99\x01\n\x06GetJob\x12\'.google.cloud.dataplex.v1.GetJobRequest\x1a\x1d.google.cloud.dataplex.v1.Job\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}\x12\xa2\x01\n\tCancelJob\x12*.google.cloud.dataplex.v1.CancelJobRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\"?/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel:\x01*\x12\xfd\x01\n\x11\x43reateEnvironment\x12\x32.google.cloud.dataplex.v1.CreateEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41 \n\x0b\x45nvironment\x12\x11OperationMetadata\xda\x41!parent,environment,environment_id\x82\xd3\xe4\x93\x02G\"8/v1/{parent=projects/*/locations/*/lakes/*}/environments:\x0b\x65nvironment\x12\xff\x01\n\x11UpdateEnvironment\x12\x32.google.cloud.dataplex.v1.UpdateEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41 \n\x0b\x45nvironment\x12\x11OperationMetadata\xda\x41\x17\x65nvironment,update_mask\x82\xd3\xe4\x93\x02S2D/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}:\x0b\x65nvironment\x12\xdc\x01\n\x11\x44\x65leteEnvironment\x12\x32.google.cloud.dataplex.v1.DeleteEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/lakes/*/environments/*}\x12\xc4\x01\n\x10ListEnvironments\x12\x31.google.cloud.dataplex.v1.ListEnvironmentsRequest\x1a\x32.google.cloud.dataplex.v1.ListEnvironmentsResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/lakes/*}/environments\x12\xb1\x01\n\x0eGetEnvironment\x12/.google.cloud.dataplex.v1.GetEnvironmentRequest\x1a%.google.cloud.dataplex.v1.Environment\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/lakes/*/environments/*}\x12\xc3\x01\n\x0cListSessions\x12-.google.cloud.dataplex.v1.ListSessionsRequest\x1a..google.cloud.dataplex.v1.ListSessionsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBh\n\x1c\x63om.google.cloud.dataplex.v1B\x0cServiceProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.dataplex.v1.Lake", "google/cloud/dataplex/v1/resources.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.dataplex.v1.Task", "google/cloud/dataplex/v1/tasks.proto"], + ["google.cloud.dataplex.v1.Environment", "google/cloud/dataplex/v1/analyze.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + CreateLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateLakeRequest").msgclass + UpdateLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateLakeRequest").msgclass + DeleteLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteLakeRequest").msgclass + ListLakesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakesRequest").msgclass + ListLakesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakesResponse").msgclass + ListLakeActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakeActionsRequest").msgclass + ListActionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListActionsResponse").msgclass + GetLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetLakeRequest").msgclass + CreateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateZoneRequest").msgclass + UpdateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateZoneRequest").msgclass + DeleteZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteZoneRequest").msgclass + ListZonesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZonesRequest").msgclass + ListZonesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZonesResponse").msgclass + ListZoneActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZoneActionsRequest").msgclass + GetZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetZoneRequest").msgclass + CreateAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateAssetRequest").msgclass + UpdateAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateAssetRequest").msgclass + DeleteAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteAssetRequest").msgclass + ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetsRequest").msgclass + ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetsResponse").msgclass + ListAssetActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetActionsRequest").msgclass + GetAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetAssetRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.OperationMetadata").msgclass + CreateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateTaskRequest").msgclass + UpdateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateTaskRequest").msgclass + DeleteTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteTaskRequest").msgclass + ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListTasksRequest").msgclass + ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListTasksResponse").msgclass + GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetTaskRequest").msgclass + GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetJobRequest").msgclass + RunTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunTaskRequest").msgclass + RunTaskResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunTaskResponse").msgclass + ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListJobsRequest").msgclass + ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListJobsResponse").msgclass + CancelJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CancelJobRequest").msgclass + CreateEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEnvironmentRequest").msgclass + UpdateEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEnvironmentRequest").msgclass + DeleteEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEnvironmentRequest").msgclass + ListEnvironmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEnvironmentsRequest").msgclass + ListEnvironmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEnvironmentsResponse").msgclass + GetEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEnvironmentRequest").msgclass + ListSessionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListSessionsRequest").msgclass + ListSessionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListSessionsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb new file mode 100644 index 000000000000..8e58c9ae95b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb @@ -0,0 +1,117 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/service.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# + +require 'grpc' +require 'google/cloud/dataplex/v1/service_pb' + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + # 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 Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.DataplexService' + + # Creates a lake resource. + rpc :CreateLake, ::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Google::Longrunning::Operation + # Updates a lake resource. + rpc :UpdateLake, ::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Google::Longrunning::Operation + # Deletes a lake resource. All zones within the lake must be deleted before + # the lake can be deleted. + rpc :DeleteLake, ::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Google::Longrunning::Operation + # Lists lake resources in a project and location. + rpc :ListLakes, ::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Google::Cloud::Dataplex::V1::ListLakesResponse + # Retrieves a lake resource. + rpc :GetLake, ::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Google::Cloud::Dataplex::V1::Lake + # Lists action resources in a lake. + rpc :ListLakeActions, ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse + # Creates a zone resource within a lake. + rpc :CreateZone, ::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Google::Longrunning::Operation + # Updates a zone resource. + rpc :UpdateZone, ::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Google::Longrunning::Operation + # Deletes a zone resource. All assets within a zone must be deleted before + # the zone can be deleted. + rpc :DeleteZone, ::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Google::Longrunning::Operation + # Lists zone resources in a lake. + rpc :ListZones, ::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Google::Cloud::Dataplex::V1::ListZonesResponse + # Retrieves a zone resource. + rpc :GetZone, ::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Google::Cloud::Dataplex::V1::Zone + # Lists action resources in a zone. + rpc :ListZoneActions, ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse + # Creates an asset resource. + rpc :CreateAsset, ::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Google::Longrunning::Operation + # Updates an asset resource. + rpc :UpdateAsset, ::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Google::Longrunning::Operation + # Deletes an asset resource. The referenced storage resource is detached + # (default) or deleted based on the associated Lifecycle policy. + rpc :DeleteAsset, ::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Google::Longrunning::Operation + # Lists asset resources in a zone. + rpc :ListAssets, ::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Google::Cloud::Dataplex::V1::ListAssetsResponse + # Retrieves an asset resource. + rpc :GetAsset, ::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Google::Cloud::Dataplex::V1::Asset + # Lists action resources in an asset. + rpc :ListAssetActions, ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse + # Creates a task resource within a lake. + rpc :CreateTask, ::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Google::Longrunning::Operation + # Update the task resource. + rpc :UpdateTask, ::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Google::Longrunning::Operation + # Delete the task resource. + rpc :DeleteTask, ::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Google::Longrunning::Operation + # Lists tasks under the given lake. + rpc :ListTasks, ::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Google::Cloud::Dataplex::V1::ListTasksResponse + # Get task resource. + rpc :GetTask, ::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Google::Cloud::Dataplex::V1::Task + # Lists Jobs under the given task. + rpc :ListJobs, ::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Google::Cloud::Dataplex::V1::ListJobsResponse + # Run an on demand execution of a Task. + rpc :RunTask, ::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Google::Cloud::Dataplex::V1::RunTaskResponse + # Get job resource. + rpc :GetJob, ::Google::Cloud::Dataplex::V1::GetJobRequest, ::Google::Cloud::Dataplex::V1::Job + # Cancel jobs running for the task resource. + rpc :CancelJob, ::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Google::Protobuf::Empty + # Create an environment resource. + rpc :CreateEnvironment, ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, ::Google::Longrunning::Operation + # Update the environment resource. + rpc :UpdateEnvironment, ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, ::Google::Longrunning::Operation + # Delete the environment resource. All the child resources must have been + # deleted before environment deletion can be initiated. + rpc :DeleteEnvironment, ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, ::Google::Longrunning::Operation + # Lists environments under the given lake. + rpc :ListEnvironments, ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse + # Get environment resource. + rpc :GetEnvironment, ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, ::Google::Cloud::Dataplex::V1::Environment + # Lists session resources in an environment. + rpc :ListSessions, ::Google::Cloud::Dataplex::V1::ListSessionsRequest, ::Google::Cloud::Dataplex::V1::ListSessionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb new file mode 100644 index 000000000000..81b3556fdcdd --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/tasks.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/resources_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n$google/cloud/dataplex/v1/tasks.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x16\n\x04Task\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x07 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x08 \x03(\x0b\x32*.google.cloud.dataplex.v1.Task.LabelsEntryB\x03\xe0\x41\x01\x12\x45\n\x0ctrigger_spec\x18\x64 \x01(\x0b\x32*.google.cloud.dataplex.v1.Task.TriggerSpecB\x03\xe0\x41\x02\x12I\n\x0e\x65xecution_spec\x18\x65 \x01(\x0b\x32,.google.cloud.dataplex.v1.Task.ExecutionSpecB\x03\xe0\x41\x02\x12N\n\x10\x65xecution_status\x18\xc9\x01 \x01(\x0b\x32..google.cloud.dataplex.v1.Task.ExecutionStatusB\x03\xe0\x41\x03\x12@\n\x05spark\x18\xac\x02 \x01(\x0b\x32..google.cloud.dataplex.v1.Task.SparkTaskConfigH\x00\x12\x46\n\x08notebook\x18\xae\x02 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.NotebookTaskConfigH\x00\x1a\x9a\x06\n\x12InfrastructureSpec\x12X\n\x05\x62\x61tch\x18\x34 \x01(\x0b\x32G.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResourcesH\x00\x12\x62\n\x0f\x63ontainer_image\x18\x65 \x01(\x0b\x32G.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntimeH\x01\x12T\n\x0bvpc_network\x18\x96\x01 \x01(\x0b\x32<.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetworkH\x02\x1aW\n\x15\x42\x61tchComputeResources\x12\x1c\n\x0f\x65xecutors_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12 \n\x13max_executors_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a\x86\x02\n\x15\x43ontainerImageRuntime\x12\x12\n\x05image\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tjava_jars\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fpython_packages\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12p\n\nproperties\x18\x04 \x03(\x0b\x32W.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.PropertiesEntryB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\nVpcNetwork\x12\x16\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1a\n\x0bsub_network\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\x0cnetwork_tags\x18\x03 \x03(\tB\x03\xe0\x41\x01\x42\x0e\n\x0cnetwork_nameB\x0b\n\tresourcesB\t\n\x07runtimeB\t\n\x07network\x1a\x9a\x02\n\x0bTriggerSpec\x12\x45\n\x04type\x18\x05 \x01(\x0e\x32/.google.cloud.dataplex.v1.Task.TriggerSpec.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x33\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_retries\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\x64 \x01(\tB\x03\xe0\x41\x01H\x00\":\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\r\n\tRECURRING\x10\x02\x42\t\n\x07trigger\x1a\x95\x02\n\rExecutionSpec\x12I\n\x04\x61rgs\x18\x04 \x03(\x0b\x32\x36.google.cloud.dataplex.v1.Task.ExecutionSpec.ArgsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07project\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x1amax_job_execution_lifetime\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x14\n\x07kms_key\x18\t \x01(\tB\x03\xe0\x41\x01\x1a+\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xa5\x02\n\x0fSparkTaskConfig\x12\x1b\n\x11main_jar_file_uri\x18\x64 \x01(\tH\x00\x12\x14\n\nmain_class\x18\x65 \x01(\tH\x00\x12\x1c\n\x12python_script_file\x18\x66 \x01(\tH\x00\x12\x19\n\x0fsql_script_file\x18h \x01(\tH\x00\x12\x14\n\nsql_script\x18i \x01(\tH\x00\x12\x16\n\tfile_uris\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61rchive_uris\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12S\n\x13infrastructure_spec\x18\x06 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.InfrastructureSpecB\x03\xe0\x41\x01\x42\x08\n\x06\x64river\x1a\xb3\x01\n\x12NotebookTaskConfig\x12\x15\n\x08notebook\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12S\n\x13infrastructure_spec\x18\x03 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.InfrastructureSpecB\x03\xe0\x41\x01\x12\x16\n\tfile_uris\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61rchive_uris\x18\x06 \x03(\tB\x03\xe0\x41\x01\x1a\x7f\n\x0f\x45xecutionStatus\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\nlatest_job\x18\t \x01(\x0b\x32\x1d.google.cloud.dataplex.v1.JobB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:d\xea\x41\x61\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x41projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}B\x08\n\x06\x63onfig\"\xc5\x07\n\x03Job\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x03\xfa\x41\x1d\n\x1b\x64\x61taplex.googleapis.com/Job\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x05state\x18\x05 \x01(\x0e\x32#.google.cloud.dataplex.v1.Job.StateB\x03\xe0\x41\x03\x12\x18\n\x0bretry_count\x18\x06 \x01(\rB\x03\xe0\x41\x03\x12;\n\x07service\x18\x07 \x01(\x0e\x32%.google.cloud.dataplex.v1.Job.ServiceB\x03\xe0\x41\x03\x12\x18\n\x0bservice_job\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\t \x01(\tB\x03\xe0\x41\x03\x12>\n\x06labels\x18\n \x03(\x0b\x32).google.cloud.dataplex.v1.Job.LabelsEntryB\x03\xe0\x41\x03\x12;\n\x07trigger\x18\x0b \x01(\x0e\x32%.google.cloud.dataplex.v1.Job.TriggerB\x03\xe0\x41\x03\x12I\n\x0e\x65xecution_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.Task.ExecutionSpecB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"0\n\x07Service\x12\x17\n\x13SERVICE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TAPROC\x10\x01\"r\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0e\n\nCANCELLING\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0b\n\x07\x41\x42ORTED\x10\x06\"D\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTASK_CONFIG\x10\x01\x12\x0f\n\x0bRUN_REQUEST\x10\x02:n\xea\x41k\n\x1b\x64\x61taplex.googleapis.com/Job\x12Lprojects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}Bf\n\x1c\x63om.google.cloud.dataplex.v1B\nTasksProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Dataplex + module V1 + Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task").msgclass + Task::InfrastructureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec").msgclass + Task::InfrastructureSpec::BatchComputeResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources").msgclass + Task::InfrastructureSpec::ContainerImageRuntime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime").msgclass + Task::InfrastructureSpec::VpcNetwork = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork").msgclass + Task::TriggerSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.TriggerSpec").msgclass + Task::TriggerSpec::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.TriggerSpec.Type").enummodule + Task::ExecutionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.ExecutionSpec").msgclass + Task::SparkTaskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.SparkTaskConfig").msgclass + Task::NotebookTaskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.NotebookTaskConfig").msgclass + Task::ExecutionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.ExecutionStatus").msgclass + Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job").msgclass + Job::Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.Service").enummodule + Job::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.State").enummodule + Job::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.Trigger").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb new file mode 100644 index 000000000000..5ab8544710fa --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md new file mode 100644 index 000000000000..b4aad34dcd67 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Dataplex V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..934c39849a6a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb @@ -0,0 +1,399 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: + # seconds: 60 # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: + # seconds: 360 # 6 minutes + # total_poll_timeout: + # seconds: 54000 # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..b03587481349 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..38b4b61e6061 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..6497ebc78dc1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same + # concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb new file mode 100644 index 000000000000..eda6a23185b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb @@ -0,0 +1,290 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # Environment represents a user-visible compute infrastructure for analytics + # within a lake. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the environment, of the form: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/environment/\\{environment_id} + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Environment creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the environment was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined labels for the environment. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the environment. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the environment. + # @!attribute [rw] infrastructure_spec + # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec] + # Required. Infrastructure specification for the Environment. + # @!attribute [rw] session_spec + # @return [::Google::Cloud::Dataplex::V1::Environment::SessionSpec] + # Optional. Configuration for sessions created for this environment. + # @!attribute [r] session_status + # @return [::Google::Cloud::Dataplex::V1::Environment::SessionStatus] + # Output only. Status of sessions created for this environment. + # @!attribute [r] endpoints + # @return [::Google::Cloud::Dataplex::V1::Environment::Endpoints] + # Output only. URI Endpoints to access sessions associated with the + # Environment. + class Environment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for the underlying infrastructure used to run workloads. + # @!attribute [rw] compute + # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec::ComputeResources] + # Optional. Compute resources needed for analyze interactive workloads. + # @!attribute [rw] os_image + # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec::OsImageRuntime] + # Required. Software Runtime Configuration for analyze interactive + # workloads. + class InfrastructureSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Compute resources associated with the analyze interactive workloads. + # @!attribute [rw] disk_size_gb + # @return [::Integer] + # Optional. Size in GB of the disk. Default is 100 GB. + # @!attribute [rw] node_count + # @return [::Integer] + # Optional. Total number of nodes in the sessions created for this + # environment. + # @!attribute [rw] max_node_count + # @return [::Integer] + # Optional. Max configurable nodes. + # If max_node_count > node_count, then auto-scaling is enabled. + class ComputeResources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Software Runtime Configuration to run Analyze. + # @!attribute [rw] image_version + # @return [::String] + # Required. Dataplex Image version. + # @!attribute [rw] java_libraries + # @return [::Array<::String>] + # 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 + # @!attribute [rw] python_packages + # @return [::Array<::String>] + # 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 + # @!attribute [rw] properties + # @return [::Google::Protobuf::Map{::String => ::String}] + # 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". + class OsImageRuntime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class PropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Configuration for sessions created for this environment. + # @!attribute [rw] max_idle_duration + # @return [::Google::Protobuf::Duration] + # Optional. The idle time configuration of the session. The session will be + # auto-terminated at the end of this period. + # @!attribute [rw] enable_fast_startup + # @return [::Boolean] + # 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. + class SessionSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of sessions created for this environment. + # @!attribute [r] active + # @return [::Boolean] + # Output only. Queries over sessions to mark whether the environment is + # currently active or not + class SessionStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # URI Endpoints to access sessions associated with the Environment. + # @!attribute [r] notebooks + # @return [::String] + # Output only. URI to serve notebook APIs + # @!attribute [r] sql + # @return [::String] + # Output only. URI to serve SQL APIs + class Endpoints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Content represents a user-visible notebook or a sql script + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the content, of the form: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [rw] path + # @return [::String] + # Required. The path for the Content file, represented as directory + # structure. Unique within a lake. Limited to alphanumerics, hyphens, + # underscores, dots and slashes. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Content creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the content was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined labels for the content. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the content. + # @!attribute [rw] data_text + # @return [::String] + # Required. Content data in string format. + # @!attribute [rw] sql_script + # @return [::Google::Cloud::Dataplex::V1::Content::SqlScript] + # Sql Script related configurations. + # @!attribute [rw] notebook + # @return [::Google::Cloud::Dataplex::V1::Content::Notebook] + # Notebook related configurations. + class Content + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for the Sql Script content. + # @!attribute [rw] engine + # @return [::Google::Cloud::Dataplex::V1::Content::SqlScript::QueryEngine] + # Required. Query Engine to be used for the Sql Query. + class SqlScript + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Query Engine Type of the SQL Script. + module QueryEngine + # Value was unspecified. + QUERY_ENGINE_UNSPECIFIED = 0 + + # Spark SQL Query. + SPARK = 2 + end + end + + # Configuration for Notebook content. + # @!attribute [rw] kernel_type + # @return [::Google::Cloud::Dataplex::V1::Content::Notebook::KernelType] + # Required. Kernel Type of the notebook. + class Notebook + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Kernel Type of the Jupyter notebook. + module KernelType + # Kernel Type unspecified. + KERNEL_TYPE_UNSPECIFIED = 0 + + # Python 3 Kernel. + PYTHON3 = 1 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents an active analyze session running for a user. + # @!attribute [r] name + # @return [::String] + # 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} + # @!attribute [r] user_id + # @return [::String] + # Output only. Email of user running the session. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Session start time. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. State of Session + class Session + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb new file mode 100644 index 000000000000..aca578b5e853 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb @@ -0,0 +1,1092 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # Aspect Type is a template for creating Aspects, and represents the + # JSON-schema for a given Entry, e.g., BigQuery Table Schema. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the AspectType, of the form: + # projects/\\{project_number}/locations/\\{location_id}/aspectTypes/\\{aspect_type_id}. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the AspectType was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the AspectType was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the AspectType. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the AspectType. + # @!attribute [rw] etag + # @return [::String] + # 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. + # @!attribute [rw] authorization + # @return [::Google::Cloud::Dataplex::V1::AspectType::Authorization] + # Immutable. Authorization defined for this type. + # @!attribute [rw] metadata_template + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] + # Required. MetadataTemplate of the aspect. + # @!attribute [r] transfer_status + # @return [::Google::Cloud::Dataplex::V1::TransferStatus] + # Output only. Denotes the transfer status of the Aspect Type. It is + # unspecified for Aspect Types created from Dataplex API. + class AspectType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Autorization for an Aspect Type. + # @!attribute [rw] alternate_use_permission + # @return [::String] + # 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. + class Authorization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MetadataTemplate definition for AspectType + # @!attribute [rw] index + # @return [::Integer] + # 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. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the field. + # @!attribute [rw] type + # @return [::String] + # 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). + # @!attribute [rw] record_fields + # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate>] + # Optional. Field definition, needs to be specified if the type is record. + # Defines the nested fields. + # @!attribute [rw] enum_values + # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::EnumValue>] + # Optional. The list of values for an enum type. Needs to be defined if the + # type is enum. + # @!attribute [rw] map_items + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] + # 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 + # MetadataTemplate. The recommended value for the name field is item, as + # this is not used in the actual payload. + # @!attribute [rw] array_items + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] + # 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. + # @!attribute [rw] type_id + # @return [::String] + # 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. + # @!attribute [rw] type_ref + # @return [::String] + # Optional. A reference to another field definition (instead of 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 + # refer to other fields. + # @!attribute [rw] constraints + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::Constraints] + # Optional. Specifies the constraints on this field. + # @!attribute [rw] annotations + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::Annotations] + # Optional. Specifies annotations on this field. + class MetadataTemplate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Definition of Enumvalue (to be used by enum fields) + # @!attribute [rw] index + # @return [::Integer] + # Required. Index for the enum. Cannot be modified. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the enumvalue. This is the actual value that the + # aspect will contain. + # @!attribute [rw] deprecated + # @return [::String] + # Optional. Optional deprecation message to be set if an enum value needs + # to be deprecated. + class EnumValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Definition of the constraints of a field + # @!attribute [rw] required + # @return [::Boolean] + # Optional. Marks this as an optional/required field. + class Constraints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Definition of the annotations of a field + # @!attribute [rw] deprecated + # @return [::String] + # Optional. Marks a field as deprecated, a deprecation message can be + # included. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Specify a displayname for a field. + # @!attribute [rw] description + # @return [::String] + # Optional. Specify a description for a field + # @!attribute [rw] display_order + # @return [::Integer] + # Optional. Specify a display order for a field. Display order can be + # used to reorder where a field is rendered + # @!attribute [rw] string_type + # @return [::String] + # 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. + # @!attribute [rw] string_values + # @return [::Array<::String>] + # Optional. Suggested hints for string fields. These can be used to + # suggest values to users, through an UI for example. + class Annotations + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An Entry Group represents a logical grouping of one or more Entries. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the EntryGroup, of the form: + # projects/\\{project_number}/locations/\\{location_id}/entryGroups/\\{entry_group_id}. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the EntryGroup was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the EntryGroup was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the EntryGroup. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the EntryGroup. + # @!attribute [rw] etag + # @return [::String] + # 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. + # @!attribute [r] transfer_status + # @return [::Google::Cloud::Dataplex::V1::TransferStatus] + # Output only. Denotes the transfer status of the Entry Group. It is + # unspecified for Entry Group created from Dataplex API. + class EntryGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Entry Type is a template for creating Entries. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the EntryType, of the form: + # projects/\\{project_number}/locations/\\{location_id}/entryTypes/\\{entry_type_id}. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the EntryType was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the EntryType was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the EntryType. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the EntryType. + # @!attribute [rw] etag + # @return [::String] + # 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. + # @!attribute [rw] type_aliases + # @return [::Array<::String>] + # Optional. Indicates the class this Entry Type belongs to, for example, + # TABLE, DATABASE, MODEL. + # @!attribute [rw] platform + # @return [::String] + # Optional. The platform that Entries of this type belongs to. + # @!attribute [rw] system + # @return [::String] + # Optional. The system that Entries of this type belongs to. Examples include + # CloudSQL, MariaDB etc + # @!attribute [rw] required_aspects + # @return [::Array<::Google::Cloud::Dataplex::V1::EntryType::AspectInfo>] + # AspectInfo for the entry type. + # @!attribute [rw] authorization + # @return [::Google::Cloud::Dataplex::V1::EntryType::Authorization] + # Immutable. Authorization defined for this type. + class EntryType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] type + # @return [::String] + # Required aspect type for the entry type. + class AspectInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Authorization for an Entry Type. + # @!attribute [rw] alternate_use_permission + # @return [::String] + # 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. + class Authorization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An aspect is a single piece of metadata describing an entry. + # @!attribute [r] aspect_type + # @return [::String] + # Output only. The resource name of the type used to create this Aspect. + # @!attribute [r] path + # @return [::String] + # Output only. The path in the entry under which the aspect is attached. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Aspect was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Aspect was last updated. + # @!attribute [rw] data + # @return [::Google::Protobuf::Struct] + # 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). + # @!attribute [rw] aspect_source + # @return [::Google::Cloud::Dataplex::V1::AspectSource] + class Aspect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AspectSource contains source system related information for the + # aspect. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The create time of the aspect in the source system. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The update time of the aspect in the source system. + class AspectSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An entry is a representation of a data asset which can be described by + # various metadata. + # @!attribute [rw] name + # @return [::String] + # Identifier. The relative resource name of the Entry, of the form: + # projects/\\{project}/locations/\\{location}/entryGroups/\\{entry_group}/entries/\\{entry}. + # @!attribute [rw] entry_type + # @return [::String] + # Required. Immutable. The resource name of the EntryType used to create this + # Entry. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Entry was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Entry was last updated. + # @!attribute [rw] aspects + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Dataplex::V1::Aspect}] + # 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) + # @!attribute [rw] parent_entry + # @return [::String] + # Optional. Immutable. The resource name of the parent entry. + # @!attribute [rw] fully_qualified_name + # @return [::String] + # Optional. A name for the entry that can reference it in an external system. + # The maximum size of the field is 4000 characters. + # @!attribute [rw] entry_source + # @return [::Google::Cloud::Dataplex::V1::EntrySource] + # Optional. Source system related information for an entry. + class Entry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Dataplex::V1::Aspect] + class AspectsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # EntrySource contains source system related information for the + # entry. + # @!attribute [rw] resource + # @return [::String] + # The name of the resource in the source system. + # The maximum size of the field is 4000 characters. + # @!attribute [rw] system + # @return [::String] + # The name of the source system. + # The maximum size of the field is 64 characters. + # @!attribute [rw] platform + # @return [::String] + # The platform containing the source system. + # The maximum size of the field is 64 characters. + # @!attribute [rw] display_name + # @return [::String] + # User friendly display name. + # The maximum size of the field is 500 characters. + # @!attribute [rw] description + # @return [::String] + # Description of the Entry. + # The maximum size of the field is 2000 characters. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # User-defined labels. + # The maximum size of keys and values is 128 characters each. + # @!attribute [rw] ancestors + # @return [::Array<::Google::Cloud::Dataplex::V1::EntrySource::Ancestor>] + # Immutable. The ancestors of the Entry in the source system. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The create time of the resource in the source system. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The update time of the resource in the source system. + class EntrySource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Ancestor contains information about individual items in the hierarchy of + # an Entry. + # @!attribute [rw] name + # @return [::String] + # Optional. The name of the ancestor resource. + # @!attribute [rw] type + # @return [::String] + # Optional. The type of the ancestor resource. + class Ancestor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Create EntryGroup Request + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the entryGroup, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a GCP region. + # @!attribute [rw] entry_group_id + # @return [::String] + # Required. EntryGroup identifier. + # @!attribute [rw] entry_group + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # Required. EntryGroup Resource + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateEntryGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update EntryGroup Request + # @!attribute [rw] entry_group + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # Required. EntryGroup Resource + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateEntryGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delele EntryGroup Request + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryGroupRequest method returns an ABORTED error response + class DeleteEntryGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List entryGroups request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListEntryGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List ListEntryGroups response. + # @!attribute [rw] entry_groups + # @return [::Array<::Google::Cloud::Dataplex::V1::EntryGroup>] + # ListEntryGroups under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListEntryGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get EntryGroup request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + class GetEntryGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create EntryType Request + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the EntryType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a GCP region. + # @!attribute [rw] entry_type_id + # @return [::String] + # Required. EntryType identifier. + # @!attribute [rw] entry_type + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # Required. EntryType Resource + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateEntryTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update EntryType Request + # @!attribute [rw] entry_type + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # Required. EntryType Resource + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateEntryTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delele EntryType Request + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryTypeRequest method returns an ABORTED error response + class DeleteEntryTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List EntryTypes request + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + class ListEntryTypesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List EntryTypes response + # @!attribute [rw] entry_types + # @return [::Array<::Google::Cloud::Dataplex::V1::EntryType>] + # ListEntryTypes under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListEntryTypesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get EntryType request + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + class GetEntryTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create AspectType Request + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the AspectType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a GCP region. + # @!attribute [rw] aspect_type_id + # @return [::String] + # Required. AspectType identifier. + # @!attribute [rw] aspect_type + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # Required. AspectType Resource + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateAspectTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update AspectType Request + # @!attribute [rw] aspect_type + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # Required. AspectType Resource + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateAspectTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delele AspectType Request + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteAspectTypeRequest method returns an ABORTED error response + class DeleteAspectTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List AspectTypes request + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + class ListAspectTypesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List AspectTypes response + # @!attribute [rw] aspect_types + # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType>] + # ListAspectTypes under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListAspectTypesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get AspectType request + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + class GetAspectTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @!attribute [rw] entry_id + # @return [::String] + # 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 + # `//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 + # Cloud. + # + # The maximum size of the field is 4000 characters. + # @!attribute [rw] entry + # @return [::Google::Cloud::Dataplex::V1::Entry] + # Required. Entry resource. + class CreateEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] entry + # @return [::Google::Cloud::Dataplex::V1::Entry] + # Required. Entry resource. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # 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. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true and the entry does not exist, it will be created. + # @!attribute [rw] delete_missing_aspects + # @return [::Boolean] + # 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. + # @!attribute [rw] aspect_keys + # @return [::Array<::String>] + # 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 + # `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. + class UpdateEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + class DeleteEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @!attribute [rw] page_size + # @return [::Integer] + # @!attribute [rw] page_token + # @return [::String] + # Optional. The pagination token returned by a previous request. + # @!attribute [rw] filter + # @return [::String] + # 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" + class ListEntriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] entries + # @return [::Array<::Google::Cloud::Dataplex::V1::Entry>] + # The list of entries. + # @!attribute [rw] next_page_token + # @return [::String] + # Pagination token. + class ListEntriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View for controlling which parts of an entry are to be returned. + # @!attribute [rw] aspect_types + # @return [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # Only works if the CUSTOM view is selected. + # @!attribute [rw] paths + # @return [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. Only works if the CUSTOM view is selected. + class GetEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/{location}`. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View for controlling which parts of an entry are to be returned. + # @!attribute [rw] aspect_types + # @return [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # Only works if the CUSTOM view is selected. + # @!attribute [rw] paths + # @return [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. Only works if the CUSTOM view is selected. + # @!attribute [rw] entry + # @return [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + class LookupEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/{location}`. + # @!attribute [rw] query + # @return [::String] + # Required. The query against which entries in scope should be matched. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Pagination. + # @!attribute [rw] page_token + # @return [::String] + # @!attribute [rw] order_by + # @return [::String] + # Optional. Ordering of the results. Supported options to be added later. + # @!attribute [rw] scope + # @return [::String] + # 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. + class SearchEntriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single result of a SearchEntries request. + # @!attribute [rw] linked_resource + # @return [::String] + # Linked resource name. + # @!attribute [rw] dataplex_entry + # @return [::Google::Cloud::Dataplex::V1::Entry] + # Entry format of the result. + # @!attribute [rw] snippets + # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResult::Snippets] + # Snippets. + class SearchEntriesResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Snippets for the entry, contains HTML-style highlighting for + # matched tokens, will be used in UI. + # @!attribute [rw] dataplex_entry + # @return [::Google::Cloud::Dataplex::V1::Entry] + # Entry + class Snippets + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] + # The results matching the search query. + # @!attribute [rw] total_size + # @return [::Integer] + # The estimated total number of matching entries. Not guaranteed to be + # accurate. + # @!attribute [rw] next_page_token + # @return [::String] + # Pagination token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable locations. Search results don't include data from those + # locations. + class SearchEntriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # View for controlling which parts of an entry are to be returned. + module 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 would exceed 100, the first 100 will be returned. + CUSTOM = 3 + + # Returns all aspects. If the number of aspects would exceed 100, the first + # 100 will be returned. + ALL = 4 + end + + # Denotes the transfer status of a resource. It is unspecified for resources + # created from Dataplex API. + module 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 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb new file mode 100644 index 000000000000..9fdc543e77b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # Create content request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} + # @!attribute [rw] content + # @return [::Google::Cloud::Dataplex::V1::Content] + # Required. Content resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateContentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update content request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] content + # @return [::Google::Cloud::Dataplex::V1::Content] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateContentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete content request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the content: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + class DeleteContentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List content request. Returns the BASIC Content view. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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. + class ListContentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List content response. + # @!attribute [rw] content + # @return [::Array<::Google::Cloud::Dataplex::V1::Content>] + # Content under the given parent lake. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListContentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get content request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the content: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView] + # Optional. Specify content view to make a partial request. + class GetContentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies whether the request should return the full or the partial + # representation. + module 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 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb new file mode 100644 index 000000000000..51cdbb703b14 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb @@ -0,0 +1,321 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # DataProfileScan related setting. + # @!attribute [rw] sampling_percent + # @return [::Float] + # 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. + # @!attribute [rw] row_filter + # @return [::String] + # 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 + # @!attribute [rw] post_scan_actions + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::PostScanActions] + # Optional. Actions to take upon job completion.. + # @!attribute [rw] include_fields + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::SelectedFields] + # 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`. + # @!attribute [rw] exclude_fields + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::SelectedFields] + # Optional. The fields to exclude from data profile. + # + # If specified, the fields will be excluded from data profile, regardless of + # `include_fields` value. + class DataProfileSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration of post scan actions of DataProfileScan job. + # @!attribute [rw] bigquery_export + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::PostScanActions::BigQueryExport] + # Optional. If set, results will be exported to the provided BigQuery + # table. + class PostScanActions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration of BigQuery export post scan action. + # @!attribute [rw] results_table + # @return [::String] + # Optional. The BigQuery table to export DataProfileScan results to. + # Format: + # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + class BigQueryExport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The specification for fields to include or exclude in data profile scan. + # @!attribute [rw] field_names + # @return [::Array<::String>] + # 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'. + class SelectedFields + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # DataProfileResult defines the output of DataProfileScan. Each field of the + # table will have field type specific profile result. + # @!attribute [rw] row_count + # @return [::Integer] + # The count of rows scanned. + # @!attribute [rw] profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile] + # The profile information per field. + # @!attribute [rw] scanned_data + # @return [::Google::Cloud::Dataplex::V1::ScannedData] + # The data scanned for this result. + # @!attribute [r] post_scan_actions_result + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult] + # Output only. The result of post scan actions. + class DataProfileResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains name, type, mode and field type specific profile information. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field>] + # List of fields with structural and profile information for each field. + class Profile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A field within a table. + # @!attribute [rw] name + # @return [::String] + # The name of the field. + # @!attribute [rw] type + # @return [::String] + # 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). + # @!attribute [rw] mode + # @return [::String] + # 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. + # @!attribute [rw] profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo] + # Profile information for the corresponding field. + class Field + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The profile information for each field type. + # @!attribute [rw] null_ratio + # @return [::Float] + # Ratio of rows with null value against total scanned rows. + # @!attribute [rw] distinct_ratio + # @return [::Float] + # Ratio of rows with distinct values against total scanned rows. + # Not available for complex non-groupable field type RECORD and fields + # with REPEATABLE mode. + # @!attribute [rw] top_n_values + # @return [::Array<::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::TopNValue>] + # 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. + # @!attribute [rw] string_profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::StringFieldInfo] + # String type field information. + # @!attribute [rw] integer_profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::IntegerFieldInfo] + # Integer type field information. + # @!attribute [rw] double_profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::DoubleFieldInfo] + # Double type field information. + class ProfileInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The profile information for a string type field. + # @!attribute [rw] min_length + # @return [::Integer] + # Minimum length of non-null values in the scanned data. + # @!attribute [rw] max_length + # @return [::Integer] + # Maximum length of non-null values in the scanned data. + # @!attribute [rw] average_length + # @return [::Float] + # Average length of non-null values in the scanned data. + class StringFieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The profile information for an integer type field. + # @!attribute [rw] average + # @return [::Float] + # Average of non-null values in the scanned data. NaN, if the field + # has a NaN. + # @!attribute [rw] standard_deviation + # @return [::Float] + # Standard deviation of non-null values in the scanned data. NaN, if + # the field has a NaN. + # @!attribute [rw] min + # @return [::Integer] + # Minimum of non-null values in the scanned data. NaN, if the field + # has a NaN. + # @!attribute [rw] quartiles + # @return [::Array<::Integer>] + # 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. + # @!attribute [rw] max + # @return [::Integer] + # Maximum of non-null values in the scanned data. NaN, if the field + # has a NaN. + class IntegerFieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The profile information for a double type field. + # @!attribute [rw] average + # @return [::Float] + # Average of non-null values in the scanned data. NaN, if the field + # has a NaN. + # @!attribute [rw] standard_deviation + # @return [::Float] + # Standard deviation of non-null values in the scanned data. NaN, if + # the field has a NaN. + # @!attribute [rw] min + # @return [::Float] + # Minimum of non-null values in the scanned data. NaN, if the field + # has a NaN. + # @!attribute [rw] quartiles + # @return [::Array<::Float>] + # 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. + # @!attribute [rw] max + # @return [::Float] + # Maximum of non-null values in the scanned data. NaN, if the field + # has a NaN. + class DoubleFieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Top N non-null values in the scanned data. + # @!attribute [rw] value + # @return [::String] + # String value of a top N non-null value. + # @!attribute [rw] count + # @return [::Integer] + # Count of the corresponding value in the scanned data. + # @!attribute [rw] ratio + # @return [::Float] + # Ratio of the corresponding value in the field against the total + # number of rows in the scanned data. + class TopNValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + + # The result of post scan actions of DataProfileScan job. + # @!attribute [r] bigquery_export_result + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult::BigQueryExportResult] + # Output only. The result of BigQuery export post scan action. + class PostScanActionsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of BigQuery export post scan action. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult::BigQueryExportResult::State] + # Output only. Execution state for the BigQuery exporting. + # @!attribute [r] message + # @return [::String] + # Output only. Additional information about the BigQuery exporting. + class BigQueryExportResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution state for the exporting. + module 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 + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb new file mode 100644 index 000000000000..ee7c3444912d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb @@ -0,0 +1,540 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # DataQualityScan related setting. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRule>] + # Required. The list of rules to evaluate against a data source. At least one + # rule is required. + # @!attribute [rw] sampling_percent + # @return [::Float] + # 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. + # @!attribute [rw] row_filter + # @return [::String] + # 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 + # @!attribute [rw] post_scan_actions + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions] + # Optional. Actions to take upon job completion. + class DataQualitySpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration of post scan actions of DataQualityScan. + # @!attribute [rw] bigquery_export + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::BigQueryExport] + # Optional. If set, results will be exported to the provided BigQuery + # table. + # @!attribute [rw] notification_report + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::NotificationReport] + # Optional. If set, results will be sent to the provided notification + # receipts upon triggers. + class PostScanActions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration of BigQuery export post scan action. + # @!attribute [rw] results_table + # @return [::String] + # Optional. The BigQuery table to export DataQualityScan results to. + # Format: + # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + class BigQueryExport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The individuals or groups who are designated to receive notifications + # upon triggers. + # @!attribute [rw] emails + # @return [::Array<::String>] + # Optional. The email recipients who will receive the DataQualityScan + # results report. + class Recipients + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This trigger is triggered when the DQ score in the job result is less + # than a specified input score. + # @!attribute [rw] score_threshold + # @return [::Float] + # Optional. The score range is in [0,100]. + class ScoreThresholdTrigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This trigger is triggered when the scan job itself fails, regardless of + # the result. + class JobFailureTrigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This trigger is triggered whenever a scan job run ends, regardless + # of the result. + class JobEndTrigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration of notification report post scan action. + # @!attribute [rw] recipients + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::Recipients] + # Required. The recipients who will receive the notification report. + # @!attribute [rw] score_threshold_trigger + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::ScoreThresholdTrigger] + # Optional. If set, report will be sent when score threshold is met. + # @!attribute [rw] job_failure_trigger + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::JobFailureTrigger] + # Optional. If set, report will be sent when a scan job fails. + # @!attribute [rw] job_end_trigger + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::JobEndTrigger] + # Optional. If set, report will be sent when a scan job ends. + class NotificationReport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # The output of a DataQualityScan. + # @!attribute [rw] passed + # @return [::Boolean] + # Overall data quality result -- `true` if all rules passed. + # @!attribute [r] score + # @return [::Float] + # Output only. The overall data quality score. + # + # The score ranges between [0, 100] (up to two decimal points). + # @!attribute [rw] dimensions + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityDimensionResult>] + # 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. + # @!attribute [r] columns + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityColumnResult>] + # 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. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRuleResult>] + # A list of all the rules in a job, and their results. + # @!attribute [rw] row_count + # @return [::Integer] + # The count of rows processed. + # @!attribute [rw] scanned_data + # @return [::Google::Cloud::Dataplex::V1::ScannedData] + # The data scanned for this result. + # @!attribute [r] post_scan_actions_result + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult] + # Output only. The result of post scan actions. + class DataQualityResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of post scan actions of DataQualityScan job. + # @!attribute [r] bigquery_export_result + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult::BigQueryExportResult] + # Output only. The result of BigQuery export post scan action. + class PostScanActionsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of BigQuery export post scan action. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult::BigQueryExportResult::State] + # Output only. Execution state for the BigQuery exporting. + # @!attribute [r] message + # @return [::String] + # Output only. Additional information about the BigQuery exporting. + class BigQueryExportResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution state for the exporting. + module 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 + end + end + end + end + + # DataQualityRuleResult provides a more detailed, per-rule view of the results. + # @!attribute [rw] rule + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule] + # The rule specified in the DataQualitySpec, as is. + # @!attribute [rw] passed + # @return [::Boolean] + # Whether the rule passed or failed. + # @!attribute [rw] evaluated_count + # @return [::Integer] + # 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`. + # @!attribute [rw] passed_count + # @return [::Integer] + # The number of rows which passed a rule evaluation. + # + # This field is only valid for row-level type rules. + # @!attribute [rw] null_count + # @return [::Integer] + # The number of rows with null values in the specified column. + # @!attribute [rw] pass_ratio + # @return [::Float] + # The ratio of **passed_count / evaluated_count**. + # + # This field is only valid for row-level type rules. + # @!attribute [rw] failing_rows_query + # @return [::String] + # The query to find rows that did not pass this rule. + # + # This field is only valid for row-level type rules. + # @!attribute [r] assertion_row_count + # @return [::Integer] + # Output only. The number of rows returned by the sql statement in the + # SqlAssertion rule. + # + # This field is only valid for SqlAssertion rules. + class DataQualityRuleResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataQualityDimensionResult provides a more detailed, per-dimension view of + # the results. + # @!attribute [r] dimension + # @return [::Google::Cloud::Dataplex::V1::DataQualityDimension] + # Output only. The dimension config specified in the DataQualitySpec, as is. + # @!attribute [rw] passed + # @return [::Boolean] + # Whether the dimension passed or failed. + # @!attribute [r] score + # @return [::Float] + # 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). + class DataQualityDimensionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A dimension captures data quality intent about a defined subset of the rules + # specified. + # @!attribute [rw] name + # @return [::String] + # The dimension name a rule belongs to. Supported dimensions are + # ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", + # "INTEGRITY"] + class DataQualityDimension + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A rule captures data quality intent about a data source. + # @!attribute [rw] range_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RangeExpectation] + # Row-level rule which evaluates whether each column value lies between a + # specified range. + # @!attribute [rw] non_null_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::NonNullExpectation] + # Row-level rule which evaluates whether each column value is null. + # @!attribute [rw] set_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::SetExpectation] + # Row-level rule which evaluates whether each column value is contained by + # a specified set. + # @!attribute [rw] regex_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RegexExpectation] + # Row-level rule which evaluates whether each column value matches a + # specified regex. + # @!attribute [rw] uniqueness_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::UniquenessExpectation] + # Row-level rule which evaluates whether each column value is unique. + # @!attribute [rw] statistic_range_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation] + # Aggregate rule which evaluates whether the column aggregate + # statistic lies between a specified range. + # @!attribute [rw] row_condition_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RowConditionExpectation] + # Row-level rule which evaluates whether each row in a table passes the + # specified condition. + # @!attribute [rw] table_condition_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation] + # Aggregate rule which evaluates whether the provided expression is true + # for a table. + # @!attribute [rw] sql_assertion + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion] + # Aggregate rule which evaluates the number of rows returned for the + # provided statement. + # @!attribute [rw] column + # @return [::String] + # Optional. The unnested column which this rule is evaluated against. + # @!attribute [rw] ignore_null + # @return [::Boolean] + # 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 + # @!attribute [rw] dimension + # @return [::String] + # Required. The dimension a rule belongs to. Results are also aggregated at + # the dimension level. Supported dimensions are **["COMPLETENESS", + # "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** + # @!attribute [rw] threshold + # @return [::Float] + # 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. + # @!attribute [rw] name + # @return [::String] + # 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. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the rule. + # + # * The maximum length is 1,024 characters. + class DataQualityRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Evaluates whether each column value lies between a specified range. + # @!attribute [rw] min_value + # @return [::String] + # 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. + # @!attribute [rw] max_value + # @return [::String] + # 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. + # @!attribute [rw] strict_min_enabled + # @return [::Boolean] + # 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. + # @!attribute [rw] strict_max_enabled + # @return [::Boolean] + # 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. + class RangeExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether each column value is null. + class NonNullExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether each column value is contained by a specified set. + # @!attribute [rw] values + # @return [::Array<::String>] + # Optional. Expected values for the column value. + class SetExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether each column value matches a specified regex. + # @!attribute [rw] regex + # @return [::String] + # Optional. A regular expression the column value is expected to match. + class RegexExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether the column has duplicates. + class UniquenessExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether the column aggregate statistic lies between a specified + # range. + # @!attribute [rw] statistic + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic] + # Optional. The aggregate metric to evaluate. + # @!attribute [rw] min_value + # @return [::String] + # 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. + # @!attribute [rw] max_value + # @return [::String] + # 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. + # @!attribute [rw] strict_min_enabled + # @return [::Boolean] + # 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. + # @!attribute [rw] strict_max_enabled + # @return [::Boolean] + # 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. + class StatisticRangeExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of aggregate metrics a rule can be evaluated against. + module 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 + end + end + + # 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 + # @!attribute [rw] sql_expression + # @return [::String] + # Optional. The SQL expression. + class RowConditionExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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 + # @!attribute [rw] sql_expression + # @return [::String] + # Optional. The SQL expression. + class TableConditionExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Queries for rows returned by the provided SQL statement. If any rows are + # are returned, this rule fails. + # + # The SQL statement needs to use BigQuery standard SQL syntax, and must not + # contain any semicolons. + # + # $\\{data()} can be used to reference the rows being evaluated, i.e. the table + # after all additional filters (row filters, incremental data filters, + # sampling) are applied. + # + # Example: SELECT * FROM $\\{data()} WHERE price < 0 + # @!attribute [rw] sql_statement + # @return [::String] + # Optional. The SQL statement. + class SqlAssertion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # DataQualityColumnResult provides a more detailed, per-column view of + # the results. + # @!attribute [r] column + # @return [::String] + # Output only. The column specified in the DataQualityRule. + # @!attribute [r] score + # @return [::Float] + # 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). + class DataQualityColumnResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb new file mode 100644 index 000000000000..072f86b2fcd8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb @@ -0,0 +1,565 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # 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. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the DataTaxonomy, of the form: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id}. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataTaxonomy was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataTaxonomy was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the DataTaxonomy. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the DataTaxonomy. + # @!attribute [r] attribute_count + # @return [::Integer] + # Output only. The number of attributes in the DataTaxonomy. + # @!attribute [rw] etag + # @return [::String] + # 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. + # @!attribute [r] class_count + # @return [::Integer] + # Output only. The number of classes in the DataTaxonomy. + class DataTaxonomy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # 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 + # ``` + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the dataAttribute, of the form: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id}. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataAttribute was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataAttribute was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the DataAttribute. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the DataAttribute. + # @!attribute [rw] parent_id + # @return [::String] + # 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] + # @!attribute [r] attribute_count + # @return [::Integer] + # Output only. The number of child attributes present for this attribute. + # @!attribute [rw] etag + # @return [::String] + # 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. + # @!attribute [rw] resource_access_spec + # @return [::Google::Cloud::Dataplex::V1::ResourceAccessSpec] + # Optional. Specified when applied to a resource (eg: Cloud Storage bucket, + # BigQuery dataset, BigQuery table). + # @!attribute [rw] data_access_spec + # @return [::Google::Cloud::Dataplex::V1::DataAccessSpec] + # Optional. Specified when applied to data stored on the resource (eg: rows, + # columns in BigQuery Tables). + class DataAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # DataAttributeBinding represents binding of attributes to resources. Eg: Bind + # 'CustomerInfo' entity with 'PII' attribute. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the Data Attribute Binding, of + # the form: + # projects/\\{project_number}/locations/\\{location}/dataAttributeBindings/\\{data_attribute_binding_id} + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataAttributeBinding was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataAttributeBinding was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the DataAttributeBinding. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the DataAttributeBinding. + # @!attribute [rw] etag + # @return [::String] + # 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. + # @!attribute [rw] resource + # @return [::String] + # 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. + # @!attribute [rw] attributes + # @return [::Array<::String>] + # Optional. List of attributes to be associated with the resource, provided + # in the form: + # projects/\\{project}/locations/\\{location}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @!attribute [rw] paths + # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttributeBinding::Path>] + # Optional. The list of paths for items within the associated resource (eg. + # columns and partitions within a table) along with attribute bindings. + class DataAttributeBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a subresource of the given resource, and associated bindings + # with it. Currently supported subresources are column and partition schema + # fields within a table. + # @!attribute [rw] name + # @return [::String] + # Required. The name identifier of the path. + # Nested columns should be of the form: 'address.city'. + # @!attribute [rw] attributes + # @return [::Array<::String>] + # 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} + class Path + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Create DataTaxonomy request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] data_taxonomy_id + # @return [::String] + # 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. + # @!attribute [rw] data_taxonomy + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # Required. DataTaxonomy resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateDataTaxonomyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update DataTaxonomy request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] data_taxonomy + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # Required. Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateDataTaxonomyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get DataTaxonomy request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + class GetDataTaxonomyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataTaxonomies request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListDataTaxonomiesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataTaxonomies response. + # @!attribute [rw] data_taxonomies + # @return [::Array<::Google::Cloud::Dataplex::V1::DataTaxonomy>] + # DataTaxonomies under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataTaxonomiesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete DataTaxonomy request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value,the DeleteDataTaxonomy method returns an ABORTED error. + class DeleteDataTaxonomyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create DataAttribute request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @!attribute [rw] data_attribute_id + # @return [::String] + # 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. + # @!attribute [rw] data_attribute + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # Required. DataAttribute resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateDataAttributeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update DataAttribute request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] data_attribute + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # Required. Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateDataAttributeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get DataAttribute request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + class GetDataAttributeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataAttributes request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListDataAttributesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataAttributes response. + # @!attribute [rw] data_attributes + # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttribute>] + # DataAttributes under the given parent DataTaxonomy. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataAttributesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete DataAttribute request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteDataAttribute method returns an ABORTED error response. + class DeleteDataAttributeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create DataAttributeBinding request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id} + # @!attribute [rw] data_attribute_binding_id + # @return [::String] + # 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. + # @!attribute [rw] data_attribute_binding + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # Required. DataAttributeBinding resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateDataAttributeBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update DataAttributeBinding request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] data_attribute_binding + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # Required. Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateDataAttributeBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get DataAttributeBinding request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + class GetDataAttributeBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataAttributeBindings request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the Location: + # projects/\\{project_number}/locations/\\{location_id} + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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" + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListDataAttributeBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataAttributeBindings response. + # @!attribute [rw] data_attribute_bindings + # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] + # DataAttributeBindings under the given parent Location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataAttributeBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete DataAttributeBinding request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # @!attribute [rw] etag + # @return [::String] + # 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. + class DeleteDataAttributeBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb new file mode 100644 index 000000000000..866900dcba0c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb @@ -0,0 +1,474 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # Create dataScan request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] data_scan + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # Required. DataScan resource. + # @!attribute [rw] data_scan_id + # @return [::String] + # 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. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + class CreateDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update dataScan request. + # @!attribute [rw] data_scan + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # Required. DataScan resource to be updated. + # + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + class UpdateDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete dataScan request. + # @!attribute [rw] name + # @return [::String] + # 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. + class DeleteDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get dataScan request. + # @!attribute [rw] name + # @return [::String] + # 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. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] + # Optional. Select the DataScan view to return. Defaults to `BASIC`. + class GetDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # DataScan view options. + module 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 + end + end + + # List dataScans request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + class ListDataScansRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List dataScans response. + # @!attribute [rw] data_scans + # @return [::Array<::Google::Cloud::Dataplex::V1::DataScan>] + # DataScans (`BASIC` view only) under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataScansResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Run DataScan Request + # @!attribute [rw] name + # @return [::String] + # 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. + class RunDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Run DataScan Response. + # @!attribute [rw] job + # @return [::Google::Cloud::Dataplex::V1::DataScanJob] + # DataScanJob created by RunDataScan request. + class RunDataScanResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get DataScanJob request. + # @!attribute [rw] name + # @return [::String] + # 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. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] + # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + class GetDataScanJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # DataScanJob view options. + module 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 + end + end + + # List DataScanJobs request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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. + class ListDataScanJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataScanJobs response. + # @!attribute [rw] data_scan_jobs + # @return [::Array<::Google::Cloud::Dataplex::V1::DataScanJob>] + # DataScanJobs (`BASIC` view only) under a given dataScan. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListDataScanJobsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Generate recommended DataQualityRules request. + # @!attribute [rw] name + # @return [::String] + # Required. The name should be either + # * the name of a datascan with at least one successful completed data + # profiling job, or + # * the name of a successful completed data profiling datascan job. + class GenerateDataQualityRulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Generate recommended DataQualityRules response. + # @!attribute [rw] rule + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRule>] + # Generated recommended \\{@link DataQualityRule}s. + class GenerateDataQualityRulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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). + # @!attribute [r] name + # @return [::String] + # 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. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the scan. + # + # * Must be between 1-1024 characters. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # + # * Must be between 1-256 characters. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the scan. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the DataScan. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the scan was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the scan was last updated. + # @!attribute [rw] data + # @return [::Google::Cloud::Dataplex::V1::DataSource] + # Required. The data source for DataScan. + # @!attribute [rw] execution_spec + # @return [::Google::Cloud::Dataplex::V1::DataScan::ExecutionSpec] + # Optional. DataScan execution settings. + # + # If not specified, the fields in it will use their default values. + # @!attribute [r] execution_status + # @return [::Google::Cloud::Dataplex::V1::DataScan::ExecutionStatus] + # Output only. Status of the data scan execution. + # @!attribute [r] type + # @return [::Google::Cloud::Dataplex::V1::DataScanType] + # Output only. The type of DataScan. + # @!attribute [rw] data_quality_spec + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec] + # DataQualityScan related setting. + # @!attribute [rw] data_profile_spec + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec] + # DataProfileScan related setting. + # @!attribute [r] data_quality_result + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult] + # Output only. The result of the data quality scan. + # @!attribute [r] data_profile_result + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult] + # Output only. The result of the data profile scan. + class DataScan + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # DataScan execution settings. + # @!attribute [rw] trigger + # @return [::Google::Cloud::Dataplex::V1::Trigger] + # 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. + # @!attribute [rw] field + # @return [::String] + # 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. + class ExecutionSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of the data scan execution. + # @!attribute [rw] latest_job_start_time + # @return [::Google::Protobuf::Timestamp] + # The time when the latest DataScanJob started. + # @!attribute [rw] latest_job_end_time + # @return [::Google::Protobuf::Timestamp] + # The time when the latest DataScanJob ended. + class ExecutionStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A DataScanJob represents an instance of DataScan execution. + # @!attribute [r] name + # @return [::String] + # 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. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the DataScanJob. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataScanJob was started. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataScanJob ended. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::DataScanJob::State] + # Output only. Execution state for the DataScanJob. + # @!attribute [r] message + # @return [::String] + # Output only. Additional information about the current state. + # @!attribute [r] type + # @return [::Google::Cloud::Dataplex::V1::DataScanType] + # Output only. The type of the parent DataScan. + # @!attribute [r] data_quality_spec + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec] + # Output only. DataQualityScan related setting. + # @!attribute [r] data_profile_spec + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec] + # Output only. DataProfileScan related setting. + # @!attribute [r] data_quality_result + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult] + # Output only. The result of the data quality scan. + # @!attribute [r] data_profile_result + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult] + # Output only. The result of the data profile scan. + class DataScanJob + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution state for the DataScanJob. + module 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 + end + end + + # The type of DataScan. + module DataScanType + # The DataScan type is unspecified. + DATA_SCAN_TYPE_UNSPECIFIED = 0 + + # Data Quality scan. + DATA_QUALITY = 1 + + # Data Profile scan. + DATA_PROFILE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb new file mode 100644 index 000000000000..87e2a85289cf --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb @@ -0,0 +1,814 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # The payload associated with Discovery data processing. + # @!attribute [rw] message + # @return [::String] + # The log message. + # @!attribute [rw] lake_id + # @return [::String] + # The id of the associated lake. + # @!attribute [rw] zone_id + # @return [::String] + # The id of the associated zone. + # @!attribute [rw] asset_id + # @return [::String] + # The id of the associated asset. + # @!attribute [rw] data_location + # @return [::String] + # The data location associated with the event. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EventType] + # The type of the event being logged. + # @!attribute [rw] config + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::ConfigDetails] + # Details about discovery configuration in effect. + # @!attribute [rw] entity + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityDetails] + # Details about the entity associated with the event. + # @!attribute [rw] partition + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::PartitionDetails] + # Details about the partition associated with the event. + # @!attribute [rw] action + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::ActionDetails] + # Details about the action associated with the event. + class DiscoveryEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Details about configuration events. + # @!attribute [rw] parameters + # @return [::Google::Protobuf::Map{::String => ::String}] + # A list of discovery configuration parameters in effect. + # The keys are the field paths within DiscoverySpec. + # Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, + # etc. + class ConfigDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParametersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Details about the entity. + # @!attribute [rw] entity + # @return [::String] + # The name of the entity resource. + # The name is the fully-qualified resource name. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityType] + # The type of the entity resource. + class EntityDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about the partition. + # @!attribute [rw] partition + # @return [::String] + # The name to the partition resource. + # The name is the fully-qualified resource name. + # @!attribute [rw] entity + # @return [::String] + # The name to the containing entity resource. + # The name is the fully-qualified resource name. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityType] + # The type of the containing entity resource. + # @!attribute [rw] sampled_data_locations + # @return [::Array<::String>] + # The locations of the data items (e.g., a Cloud Storage objects) sampled + # for metadata inference. + class PartitionDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about the action. + # @!attribute [rw] type + # @return [::String] + # The type of action. + # Eg. IncompatibleDataSchema, InvalidDataFormat + class ActionDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of the event. + module 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 + end + + # The type of the entity. + module EntityType + # An unspecified event type. + ENTITY_TYPE_UNSPECIFIED = 0 + + # Entities representing structured data. + TABLE = 1 + + # Entities representing unstructured data. + FILESET = 2 + end + end + + # The payload associated with Job logs that contains events describing jobs + # that have run within a Lake. + # @!attribute [rw] message + # @return [::String] + # The log message. + # @!attribute [rw] job_id + # @return [::String] + # The unique id identifying the job. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time when the job started running. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time when the job ended running. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::JobEvent::State] + # The job state on completion. + # @!attribute [rw] retries + # @return [::Integer] + # The number of retries. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::JobEvent::Type] + # The type of the job. + # @!attribute [rw] service + # @return [::Google::Cloud::Dataplex::V1::JobEvent::Service] + # The service used to execute the job. + # @!attribute [rw] service_job + # @return [::String] + # The reference to the job within the service. + # @!attribute [rw] execution_trigger + # @return [::Google::Cloud::Dataplex::V1::JobEvent::ExecutionTrigger] + # Job execution trigger. + class JobEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the job. + module Type + # Unspecified job type. + TYPE_UNSPECIFIED = 0 + + # Spark jobs. + SPARK = 1 + + # Notebook jobs. + NOTEBOOK = 2 + end + + # The completion status of the job. + module 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 + end + + # The service used to execute the job. + module Service + # Unspecified service. + SERVICE_UNSPECIFIED = 0 + + # Cloud Dataproc. + DATAPROC = 1 + end + + # Job Execution trigger. + module 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 + end + end + + # These messages contain information about sessions within an environment. + # The monitored resource is 'Environment'. + # @!attribute [rw] message + # @return [::String] + # The log message. + # @!attribute [rw] user_id + # @return [::String] + # The information about the user that created the session. It will be the + # email address of the user. + # @!attribute [rw] session_id + # @return [::String] + # Unique identifier for the session. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::SessionEvent::EventType] + # The type of the event. + # @!attribute [rw] query + # @return [::Google::Cloud::Dataplex::V1::SessionEvent::QueryDetail] + # The execution details of the query. + # @!attribute [rw] event_succeeded + # @return [::Boolean] + # The status of the event. + # @!attribute [rw] fast_startup_enabled + # @return [::Boolean] + # If the session is associated with an environment with fast startup enabled, + # and was created before being assigned to a user. + # @!attribute [rw] unassigned_duration + # @return [::Google::Protobuf::Duration] + # The idle duration of a warm pooled session before it is assigned to user. + class SessionEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution details of the query. + # @!attribute [rw] query_id + # @return [::String] + # The unique Query id identifying the query. + # @!attribute [rw] query_text + # @return [::String] + # The query text executed. + # @!attribute [rw] engine + # @return [::Google::Cloud::Dataplex::V1::SessionEvent::QueryDetail::Engine] + # Query Execution engine. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # Time taken for execution of the query. + # @!attribute [rw] result_size_bytes + # @return [::Integer] + # The size of results the query produced. + # @!attribute [rw] data_processed_bytes + # @return [::Integer] + # The data processed by the query. + class QueryDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Query Execution engine. + module 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 + end + end + + # The type of the event. + module 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 + end + end + + # Payload associated with Governance related log events. + # @!attribute [rw] message + # @return [::String] + # The log message. + # @!attribute [rw] event_type + # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::EventType] + # The type of the event. + # @!attribute [rw] entity + # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::Entity] + # Entity resource information if the log event is associated with a + # specific entity. + class GovernanceEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about Entity resource that the log event is associated with. + # @!attribute [rw] entity + # @return [::String] + # 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}` + # @!attribute [rw] entity_type + # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::Entity::EntityType] + # Type of entity. + class Entity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of entity. + module EntityType + # An unspecified Entity type. + ENTITY_TYPE_UNSPECIFIED = 0 + + # Table entity type. + TABLE = 1 + + # Fileset entity type. + FILESET = 2 + end + end + + # Type of governance log event. + module 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 + end + end + + # These messages contain information about the execution of a datascan. + # The monitored resource is 'DataScan' + # Next ID: 13 + # @!attribute [rw] data_source + # @return [::String] + # The data source of the data scan + # @!attribute [rw] job_id + # @return [::String] + # The identifier of the specific data scan job this log entry is for. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the data scan job was created. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time when the data scan job started to run. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time when the data scan job finished. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::ScanType] + # The type of the data scan. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::State] + # The status of the data scan job. + # @!attribute [rw] message + # @return [::String] + # The message describing the data scan job event. + # @!attribute [rw] spec_version + # @return [::String] + # A version identifier of the spec which was used to execute this job. + # @!attribute [rw] trigger + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::Trigger] + # The trigger type of the data scan job. + # @!attribute [rw] scope + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::Scope] + # The scope of the data scan (e.g. full, incremental). + # @!attribute [rw] data_profile + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataProfileResult] + # Data profile result for data profile type data scan. + # @!attribute [rw] data_quality + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataQualityResult] + # Data quality result for data quality type data scan. + # @!attribute [rw] data_profile_configs + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataProfileAppliedConfigs] + # Applied configs for data profile type data scan. + # @!attribute [rw] data_quality_configs + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataQualityAppliedConfigs] + # Applied configs for data quality type data scan. + # @!attribute [rw] post_scan_actions_result + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult] + # The result of post scan actions. + class DataScanEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Data profile result for data scan job. + # @!attribute [rw] row_count + # @return [::Integer] + # The count of rows processed in the data scan job. + class DataProfileResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Data quality result for data scan job. + # @!attribute [rw] row_count + # @return [::Integer] + # The count of rows processed in the data scan job. + # @!attribute [rw] passed + # @return [::Boolean] + # Whether the data quality result was `pass` or not. + # @!attribute [rw] dimension_passed + # @return [::Google::Protobuf::Map{::String => ::Boolean}] + # 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. + # @!attribute [rw] score + # @return [::Float] + # The table-level data quality score for the data scan job. + # + # The data quality score ranges between [0, 100] (up to two decimal + # points). + # @!attribute [rw] dimension_score + # @return [::Google::Protobuf::Map{::String => ::Float}] + # 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). + # @!attribute [rw] column_score + # @return [::Google::Protobuf::Map{::String => ::Float}] + # 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). + class DataQualityResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Boolean] + class DimensionPassedEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Float] + class DimensionScoreEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Float] + class ColumnScoreEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Applied configs for data profile type data scan job. + # @!attribute [rw] sampling_percent + # @return [::Float] + # 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. + # @!attribute [rw] row_filter_applied + # @return [::Boolean] + # Boolean indicating whether a row filter was applied in the DataScan job. + # @!attribute [rw] column_filter_applied + # @return [::Boolean] + # Boolean indicating whether a column filter was applied in the DataScan + # job. + class DataProfileAppliedConfigs + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Applied configs for data quality type data scan job. + # @!attribute [rw] sampling_percent + # @return [::Float] + # 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. + # @!attribute [rw] row_filter_applied + # @return [::Boolean] + # Boolean indicating whether a row filter was applied in the DataScan job. + class DataQualityAppliedConfigs + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Post scan actions result for data scan job. + # @!attribute [rw] bigquery_export_result + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult::BigQueryExportResult] + # The result of BigQuery export post scan action. + class PostScanActionsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of BigQuery export post scan action. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult::BigQueryExportResult::State] + # Execution state for the BigQuery exporting. + # @!attribute [rw] message + # @return [::String] + # Additional information about the BigQuery exporting. + class BigQueryExportResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution state for the exporting. + module 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 + end + end + end + + # The type of the data scan. + module 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 + end + + # The job state of the data scan. + module 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 + end + + # The trigger type for the data scan. + module Trigger + # An unspecified trigger type. + TRIGGER_UNSPECIFIED = 0 + + # Data scan triggers on demand. + ON_DEMAND = 1 + + # Data scan triggers as per schedule. + SCHEDULE = 2 + end + + # The scope of job for the data scan. + module 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 + end + end + + # Information about the result of a data quality rule for data quality scan. + # The monitored resource is 'DataScan'. + # @!attribute [rw] job_id + # @return [::String] + # Identifier of the specific data scan job this log entry is for. + # @!attribute [rw] data_source + # @return [::String] + # The data source of the data scan (e.g. BigQuery table name). + # @!attribute [rw] column + # @return [::String] + # The column which this rule is evaluated against. + # @!attribute [rw] rule_name + # @return [::String] + # The name of the data quality rule. + # @!attribute [rw] rule_type + # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::RuleType] + # The type of the data quality rule. + # @!attribute [rw] evalution_type + # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::EvaluationType] + # The evaluation type of the data quality rule. + # @!attribute [rw] rule_dimension + # @return [::String] + # The dimension of the data quality rule. + # @!attribute [rw] threshold_percent + # @return [::Float] + # The passing threshold ([0.0, 100.0]) of the data quality rule. + # @!attribute [rw] result + # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::Result] + # The result of the data quality rule. + # @!attribute [rw] evaluated_row_count + # @return [::Integer] + # The number of rows evaluated against the data quality rule. + # This field is only valid for rules of PER_ROW evaluation type. + # @!attribute [rw] passed_row_count + # @return [::Integer] + # The number of rows which passed a rule evaluation. + # This field is only valid for rules of PER_ROW evaluation type. + # @!attribute [rw] null_row_count + # @return [::Integer] + # The number of rows with null values in the specified column. + # @!attribute [rw] assertion_row_count + # @return [::Integer] + # The number of rows returned by the sql statement in the SqlAssertion rule. + # This field is only valid for SqlAssertion rules. + class DataQualityScanRuleResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the data quality rule. + module RuleType + # An unspecified rule type. + RULE_TYPE_UNSPECIFIED = 0 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#nonnullexpectation. + NON_NULL_EXPECTATION = 1 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rangeexpectation. + RANGE_EXPECTATION = 2 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#regexexpectation. + REGEX_EXPECTATION = 3 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rowconditionexpectation. + ROW_CONDITION_EXPECTATION = 4 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#setexpectation. + SET_EXPECTATION = 5 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#statisticrangeexpectation. + STATISTIC_RANGE_EXPECTATION = 6 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#tableconditionexpectation. + TABLE_CONDITION_EXPECTATION = 7 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#uniquenessexpectation. + UNIQUENESS_EXPECTATION = 8 + + # Please see + # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#sqlAssertion. + SQL_ASSERTION = 9 + end + + # The evaluation type of the data quality rule. + module 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 + end + + # Whether the data quality rule passed or failed. + module Result + # An unspecified result. + RESULT_UNSPECIFIED = 0 + + # The data quality rule passed. + PASSED = 1 + + # The data quality rule failed. + FAILED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb new file mode 100644 index 000000000000..53866289671e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb @@ -0,0 +1,733 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # Create a metadata entity request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] entity + # @return [::Google::Cloud::Dataplex::V1::Entity] + # Required. Entity resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateEntityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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. + # @!attribute [rw] entity + # @return [::Google::Cloud::Dataplex::V1::Entity] + # Required. Update description. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateEntityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete a metadata entity request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @!attribute [rw] etag + # @return [::String] + # Required. The etag associated with the entity, which can be retrieved with + # a [GetEntity][] request. + class DeleteEntityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List metadata entities request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] + # Required. Specify the entity view to make a partial list request. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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" + class ListEntitiesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Entity views. + module 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 + end + end + + # List metadata entities response. + # @!attribute [rw] entities + # @return [::Array<::Google::Cloud::Dataplex::V1::Entity>] + # Entities in the specified parent zone. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # remaining results in the list. + class ListEntitiesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get metadata entity request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] + # Optional. Used to select the subset of entity information to return. + # Defaults to `BASIC`. + class GetEntityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Entity views for get entity partial result. + module 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 + end + end + + # List metadata partitions request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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. + class ListPartitionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create metadata partition request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @!attribute [rw] partition + # @return [::Google::Cloud::Dataplex::V1::Partition] + # Required. Partition resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreatePartitionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete metadata partition request. + # @!attribute [rw] name + # @return [::String] + # 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. + # @!attribute [rw] etag + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. The etag associated with the partition. + class DeletePartitionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List metadata partitions response. + # @!attribute [rw] partitions + # @return [::Array<::Google::Cloud::Dataplex::V1::Partition>] + # Partitions under the specified parent entity. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # remaining results in the list. + class ListPartitionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get metadata partition request. + # @!attribute [rw] name + # @return [::String] + # 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. + class GetPartitionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents tables and fileset metadata contained within a zone. + # @!attribute [r] name + # @return [::String] + # 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}`. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Display name must be shorter than or equal to 256 characters. + # @!attribute [rw] description + # @return [::String] + # Optional. User friendly longer description text. Must be shorter than or + # equal to 1024 characters. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the entity was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the entity was last updated. + # @!attribute [rw] id + # @return [::String] + # 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. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag associated with the entity, which can be retrieved with + # a [GetEntity][] request. Required for update and delete requests. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Entity::Type] + # Required. Immutable. The type of entity. + # @!attribute [rw] asset + # @return [::String] + # 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. + # @!attribute [rw] data_path + # @return [::String] + # 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`. + # @!attribute [rw] data_path_pattern + # @return [::String] + # 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`. + # @!attribute [r] catalog_entry + # @return [::String] + # Output only. The name of the associated Data Catalog entry. + # @!attribute [rw] system + # @return [::Google::Cloud::Dataplex::V1::StorageSystem] + # Required. Immutable. Identifies the storage system of the entity data. + # @!attribute [rw] format + # @return [::Google::Cloud::Dataplex::V1::StorageFormat] + # Required. Identifies the storage format of the entity data. + # It does not apply to entities with data stored in BigQuery. + # @!attribute [r] compatibility + # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus] + # Output only. Metadata stores that the entity is compatible with. + # @!attribute [r] access + # @return [::Google::Cloud::Dataplex::V1::StorageAccess] + # Output only. Identifies the access mechanism to the entity. Not user + # settable. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [rw] schema + # @return [::Google::Cloud::Dataplex::V1::Schema] + # 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. + class Entity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Provides compatibility information for various metadata stores. + # @!attribute [r] hive_metastore + # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus::Compatibility] + # Output only. Whether this entity is compatible with Hive Metastore. + # @!attribute [r] bigquery + # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus::Compatibility] + # Output only. Whether this entity is compatible with BigQuery. + class CompatibilityStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Provides compatibility information for a specific metadata store. + # @!attribute [r] compatible + # @return [::Boolean] + # Output only. Whether the entity is compatible and can be represented in + # the metadata store. + # @!attribute [r] reason + # @return [::String] + # Output only. Provides additional detail if the entity is incompatible + # with the metadata store. + class Compatibility + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The type of entity. + module Type + # Type unspecified. + TYPE_UNSPECIFIED = 0 + + # Structured and semi-structured data. + TABLE = 1 + + # Unstructured data. + FILESET = 2 + end + end + + # Represents partition metadata contained within entity instances. + # @!attribute [r] name + # @return [::String] + # 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. + # @!attribute [rw] values + # @return [::Array<::String>] + # Required. Immutable. The set of values representing the partition, which + # correspond to the partition schema defined in the parent entity. + # @!attribute [rw] location + # @return [::String] + # 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/` + # @!attribute [rw] etag + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. The etag for this partition. + class Partition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Schema information describing the structure and layout of the data. + # @!attribute [rw] user_managed + # @return [::Boolean] + # 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. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>] + # Optional. The sequence of fields describing data in table entities. + # **Note:** BigQuery SchemaFields are immutable. + # @!attribute [rw] partition_fields + # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::PartitionField>] + # Optional. The sequence of fields describing the partition structure in + # entities. If this field is empty, there are no partitions within the data. + # @!attribute [rw] partition_style + # @return [::Google::Cloud::Dataplex::V1::Schema::PartitionStyle] + # Optional. The structure of paths containing partition data within the + # entity. + class Schema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a column field within a table schema. + # @!attribute [rw] name + # @return [::String] + # 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. + # @!attribute [rw] description + # @return [::String] + # Optional. User friendly field description. Must be less than or equal to + # 1024 characters. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Schema::Type] + # Required. The type of field. + # @!attribute [rw] mode + # @return [::Google::Cloud::Dataplex::V1::Schema::Mode] + # Required. Additional field semantics. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>] + # Optional. Any nested field for complex types. + class SchemaField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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. + # @!attribute [rw] name + # @return [::String] + # 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.. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Schema::Type] + # Required. Immutable. The type of field. + class PartitionField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Type information for fields in schemas and partition schemas. + module 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 + end + + # Additional qualifiers to define field semantics. + module 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 + end + + # The structure of paths within the entity, which represent partitions. + module 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 + end + end + + # Describes the format of the data within its storage location. + # @!attribute [r] format + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::Format] + # Output only. The data format associated with the stored data, which + # represents content type values. The value is inferred from mime type. + # @!attribute [rw] compression_format + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::CompressionFormat] + # Optional. The compression type associated with the stored data. + # If unspecified, the data is uncompressed. + # @!attribute [rw] mime_type + # @return [::String] + # 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} + # @!attribute [rw] csv + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::CsvOptions] + # Optional. Additional information about CSV formatted data. + # @!attribute [rw] json + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::JsonOptions] + # Optional. Additional information about CSV formatted data. + # @!attribute [rw] iceberg + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::IcebergOptions] + # Optional. Additional information about iceberg tables. + class StorageFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes CSV and similar semi-structured data formats. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. Accepts "US-ASCII", + # "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. + # @!attribute [rw] header_rows + # @return [::Integer] + # Optional. The number of rows to interpret as header rows that should be + # skipped when reading data rows. Defaults to 0. + # @!attribute [rw] delimiter + # @return [::String] + # Optional. The delimiter used to separate values. Defaults to ','. + # @!attribute [rw] quote + # @return [::String] + # Optional. The character used to quote column values. Accepts '"' + # (double quotation mark) or ''' (single quotation mark). Defaults to + # '"' (double quotation mark) if unspecified. + class CsvOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes JSON data format. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" + # and "ISO-8859-1". Defaults to UTF-8 if not specified. + class JsonOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes Iceberg data format. + # @!attribute [rw] metadata_location + # @return [::String] + # Optional. The location of where the iceberg metadata is present, must be + # within the table path + class IcebergOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The specific file format of the data. + module 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 + end + + # The specific compressed file format of the data. + module CompressionFormat + # CompressionFormat unspecified. Implies uncompressed data. + COMPRESSION_FORMAT_UNSPECIFIED = 0 + + # GZip compressed set of files. + GZIP = 2 + + # BZip2 compressed set of files. + BZIP2 = 3 + end + end + + # Describes the access mechanism of the data within its storage location. + # @!attribute [r] read + # @return [::Google::Cloud::Dataplex::V1::StorageAccess::AccessMode] + # Output only. Describes the read access mechanism of the data. Not user + # settable. + class StorageAccess + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Access Mode determines how data stored within the Entity is read. + module 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 + end + end + + # Identifies the cloud system that manages the data storage. + module 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 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb new file mode 100644 index 000000000000..5ca2d5c43e57 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb @@ -0,0 +1,106 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # DataScan scheduling and trigger settings. + # @!attribute [rw] on_demand + # @return [::Google::Cloud::Dataplex::V1::Trigger::OnDemand] + # The scan runs once via `RunDataScan` API. + # @!attribute [rw] schedule + # @return [::Google::Cloud::Dataplex::V1::Trigger::Schedule] + # The scan is scheduled to run periodically. + class Trigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The scan runs once via `RunDataScan` API. + class OnDemand + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The scan is scheduled to run periodically. + # @!attribute [rw] cron + # @return [::String] + # 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. + class Schedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The data source for DataScan. + # @!attribute [rw] entity + # @return [::String] + # 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}`. + # @!attribute [rw] resource + # @return [::String] + # 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 + class DataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data scanned during processing (e.g. in incremental DataScan) + # @!attribute [rw] incremental_field + # @return [::Google::Cloud::Dataplex::V1::ScannedData::IncrementalField] + # The range denoted by values of an incremental field + class ScannedData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A data range denoted by a pair of start/end values of a field. + # @!attribute [rw] field + # @return [::String] + # The field that contains values which monotonically increases over time + # (e.g. a timestamp column). + # @!attribute [rw] start + # @return [::String] + # Value that marks the start of the range. + # @!attribute [rw] end + # @return [::String] + # Value that marks the end of the range. + class IncrementalField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb new file mode 100644 index 000000000000..c60ba4fca1b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb @@ -0,0 +1,838 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module 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. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the lake, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the lake was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the lake was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the lake. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the lake. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the lake. + # @!attribute [r] service_account + # @return [::String] + # Output only. Service account associated with this lake. This service + # account must be authorized to access or operate on resources managed by the + # lake. + # @!attribute [rw] metastore + # @return [::Google::Cloud::Dataplex::V1::Lake::Metastore] + # Optional. Settings to manage lake and Dataproc Metastore service instance + # association. + # @!attribute [r] asset_status + # @return [::Google::Cloud::Dataplex::V1::AssetStatus] + # Output only. Aggregated status of the underlying assets of the lake. + # @!attribute [r] metastore_status + # @return [::Google::Cloud::Dataplex::V1::Lake::MetastoreStatus] + # Output only. Metastore status of the lake. + class Lake + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings to manage association of Dataproc Metastore with a lake. + # @!attribute [rw] service + # @return [::String] + # 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}` + class Metastore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of Lake and Dataproc Metastore service instance association. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::Lake::MetastoreStatus::State] + # Current state of association. + # @!attribute [rw] message + # @return [::String] + # Additional information about the current status. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the metastore status of the lake. + # @!attribute [rw] endpoint + # @return [::String] + # The URI of the endpoint used to access the Metastore service. + class MetastoreStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Current state of association. + module 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 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Aggregated status of the underlying assets of a lake or zone. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the status. + # @!attribute [rw] active_assets + # @return [::Integer] + # Number of active assets. + # @!attribute [rw] security_policy_applying_assets + # @return [::Integer] + # Number of assets that are in process of updating the security policy on + # attached resources. + class AssetStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the zone, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the zone was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the zone was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined labels for the zone. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the zone. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the zone. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Zone::Type] + # Required. Immutable. The type of the zone. + # @!attribute [rw] discovery_spec + # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec] + # Optional. Specification of the discovery feature applied to data in this + # zone. + # @!attribute [rw] resource_spec + # @return [::Google::Cloud::Dataplex::V1::Zone::ResourceSpec] + # Required. Specification of the resources that are referenced by the assets + # within this zone. + # @!attribute [r] asset_status + # @return [::Google::Cloud::Dataplex::V1::AssetStatus] + # Output only. Aggregated status of the underlying assets of the zone. + class Zone + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings for resources attached as assets within a zone. + # @!attribute [rw] location_type + # @return [::Google::Cloud::Dataplex::V1::Zone::ResourceSpec::LocationType] + # Required. Immutable. The location type of the resources that are allowed + # to be attached to the assets within this zone. + class ResourceSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Location type of the resources attached to a zone. + module 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 + end + end + + # Settings to manage the metadata discovery and publishing in a zone. + # @!attribute [rw] enabled + # @return [::Boolean] + # Required. Whether discovery is enabled. + # @!attribute [rw] include_patterns + # @return [::Array<::String>] + # 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. + # @!attribute [rw] exclude_patterns + # @return [::Array<::String>] + # 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. + # @!attribute [rw] csv_options + # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec::CsvOptions] + # Optional. Configuration for CSV data. + # @!attribute [rw] json_options + # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec::JsonOptions] + # Optional. Configuration for Json data. + # @!attribute [rw] schedule + # @return [::String] + # 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 * * * *`. + class DiscoverySpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describe CSV and similar semi-structured data formats. + # @!attribute [rw] header_rows + # @return [::Integer] + # Optional. The number of rows to interpret as header rows that should be + # skipped when reading data rows. + # @!attribute [rw] delimiter + # @return [::String] + # Optional. The delimiter being used to separate values. This defaults to + # ','. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. The default is UTF-8. + # @!attribute [rw] disable_type_inference + # @return [::Boolean] + # Optional. Whether to disable the inference of data type for CSV data. + # If true, all columns will be registered as strings. + class CsvOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describe JSON data format. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. The default is UTF-8. + # @!attribute [rw] disable_type_inference + # @return [::Boolean] + # 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). + class JsonOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Type of zone. + module 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 + end + end + + # Action represents an issue requiring administrator action for resolution. + # @!attribute [rw] category + # @return [::Google::Cloud::Dataplex::V1::Action::Category] + # The category of issue associated with the action. + # @!attribute [rw] issue + # @return [::String] + # Detailed description of the issue requiring action. + # @!attribute [rw] detect_time + # @return [::Google::Protobuf::Timestamp] + # The time that the issue was detected. + # @!attribute [r] name + # @return [::String] + # 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}`. + # @!attribute [r] lake + # @return [::String] + # Output only. The relative resource name of the lake, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [r] zone + # @return [::String] + # Output only. The relative resource name of the zone, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [r] asset + # @return [::String] + # 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}`. + # @!attribute [rw] data_locations + # @return [::Array<::String>] + # 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`). + # @!attribute [rw] invalid_data_format + # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataFormat] + # Details for issues related to invalid or unsupported data formats. + # @!attribute [rw] incompatible_data_schema + # @return [::Google::Cloud::Dataplex::V1::Action::IncompatibleDataSchema] + # Details for issues related to incompatible schemas detected within data. + # @!attribute [rw] invalid_data_partition + # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataPartition] + # Details for issues related to invalid or unsupported data partition + # structure. + # @!attribute [rw] missing_data + # @return [::Google::Cloud::Dataplex::V1::Action::MissingData] + # Details for issues related to absence of data within managed resources. + # @!attribute [rw] missing_resource + # @return [::Google::Cloud::Dataplex::V1::Action::MissingResource] + # Details for issues related to absence of a managed resource. + # @!attribute [rw] unauthorized_resource + # @return [::Google::Cloud::Dataplex::V1::Action::UnauthorizedResource] + # Details for issues related to lack of permissions to access data + # resources. + # @!attribute [rw] failed_security_policy_apply + # @return [::Google::Cloud::Dataplex::V1::Action::FailedSecurityPolicyApply] + # Details for issues related to applying security policy. + # @!attribute [rw] invalid_data_organization + # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataOrganization] + # Details for issues related to invalid data arrangement. + class Action + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Action details for resource references in assets that cannot be located. + class MissingResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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. + class UnauthorizedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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. + # @!attribute [rw] asset + # @return [::String] + # Resource name of one of the assets with failing security policy + # application. Populated for a lake or zone resource only. + class FailedSecurityPolicyApply + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Action details for invalid or unsupported data files detected by discovery. + # @!attribute [rw] sampled_data_locations + # @return [::Array<::String>] + # The list of data locations sampled and used for format/schema + # inference. + # @!attribute [rw] expected_format + # @return [::String] + # The expected data format of the entity. + # @!attribute [rw] new_format + # @return [::String] + # The new unexpected data format within the entity. + class InvalidDataFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Action details for incompatible schemas detected by discovery. + # @!attribute [rw] table + # @return [::String] + # The name of the table containing invalid data. + # @!attribute [rw] existing_schema + # @return [::String] + # The existing and expected schema of the table. The schema is provided as + # a JSON formatted structure listing columns and data types. + # @!attribute [rw] new_schema + # @return [::String] + # The new and incompatible schema within the table. The schema is provided + # as a JSON formatted structured listing columns and data types. + # @!attribute [rw] sampled_data_locations + # @return [::Array<::String>] + # The list of data locations sampled and used for format/schema + # inference. + # @!attribute [rw] schema_change + # @return [::Google::Cloud::Dataplex::V1::Action::IncompatibleDataSchema::SchemaChange] + # Whether the action relates to a schema that is incompatible or modified. + class IncompatibleDataSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Whether the action relates to a schema that is incompatible or modified. + module 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 + end + end + + # Action details for invalid or unsupported partitions detected by discovery. + # @!attribute [rw] expected_structure + # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataPartition::PartitionStructure] + # The issue type of InvalidDataPartition. + class InvalidDataPartition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The expected partition structure. + module 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 + end + end + + # Action details for absence of data detected by discovery. + class MissingData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Action details for invalid data arrangement. + class InvalidDataOrganization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The category of issues. + module 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 + end + end + + # An asset represents a cloud resource that is being managed within a lake as a + # member of a zone. + # @!attribute [r] name + # @return [::String] + # 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}`. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the asset was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the asset was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined labels for the asset. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the asset. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the asset. + # @!attribute [rw] resource_spec + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec] + # Required. Specification of the resource that is referenced by this asset. + # @!attribute [r] resource_status + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceStatus] + # Output only. Status of the resource referenced by this asset. + # @!attribute [r] security_status + # @return [::Google::Cloud::Dataplex::V1::Asset::SecurityStatus] + # Output only. Status of the security policy applied to resource referenced + # by this asset. + # @!attribute [rw] discovery_spec + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec] + # 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. + # @!attribute [r] discovery_status + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus] + # Output only. Status of the discovery feature applied to data referenced by + # this asset. + class Asset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Security policy status of the asset. Data security policy, i.e., readers, + # writers & owners, should be specified in the lake/zone/asset IAM policy. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::Asset::SecurityStatus::State] + # The current state of the security policy applied to the attached + # resource. + # @!attribute [rw] message + # @return [::String] + # Additional information about the current state. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the status. + class SecurityStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the security policy. + module 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 + end + end + + # Settings to manage the metadata discovery and publishing for an asset. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Whether discovery is enabled. + # @!attribute [rw] include_patterns + # @return [::Array<::String>] + # 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. + # @!attribute [rw] exclude_patterns + # @return [::Array<::String>] + # 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. + # @!attribute [rw] csv_options + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec::CsvOptions] + # Optional. Configuration for CSV data. + # @!attribute [rw] json_options + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec::JsonOptions] + # Optional. Configuration for Json data. + # @!attribute [rw] schedule + # @return [::String] + # 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 * * * *`. + class DiscoverySpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describe CSV and similar semi-structured data formats. + # @!attribute [rw] header_rows + # @return [::Integer] + # Optional. The number of rows to interpret as header rows that should be + # skipped when reading data rows. + # @!attribute [rw] delimiter + # @return [::String] + # Optional. The delimiter being used to separate values. This defaults to + # ','. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. The default is UTF-8. + # @!attribute [rw] disable_type_inference + # @return [::Boolean] + # Optional. Whether to disable the inference of data type for CSV data. + # If true, all columns will be registered as strings. + class CsvOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describe JSON data format. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. The default is UTF-8. + # @!attribute [rw] disable_type_inference + # @return [::Boolean] + # 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). + class JsonOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Identifies the cloud resource that is referenced by this asset. + # @!attribute [rw] name + # @return [::String] + # 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}` + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec::Type] + # Required. Immutable. Type of resource. + # @!attribute [rw] read_access_mode + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec::AccessMode] + # Optional. Determines how read permissions are handled for each asset and + # their associated tables. Only available to storage buckets assets. + class ResourceSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of resource. + module Type + # Type not specified. + TYPE_UNSPECIFIED = 0 + + # Cloud Storage bucket. + STORAGE_BUCKET = 1 + + # BigQuery dataset. + BIGQUERY_DATASET = 2 + end + + # Access Mode determines how data stored within the resource is read. This + # is only applicable to storage bucket assets. + module 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 + end + end + + # Status of the resource referenced by an asset. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceStatus::State] + # The current state of the managed resource. + # @!attribute [rw] message + # @return [::String] + # Additional information about the current state. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the status. + # @!attribute [r] managed_access_identity + # @return [::String] + # Output only. Service account associated with the BigQuery Connection. + class ResourceStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of a resource. + module State + # State unspecified. + STATE_UNSPECIFIED = 0 + + # Resource does not have any errors. + READY = 1 + + # Resource has errors. + ERROR = 2 + end + end + + # Status of discovery for an asset. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus::State] + # The current status of the discovery feature. + # @!attribute [rw] message + # @return [::String] + # Additional information about the current state. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the status. + # @!attribute [rw] last_run_time + # @return [::Google::Protobuf::Timestamp] + # The start time of the last discovery run. + # @!attribute [rw] stats + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus::Stats] + # Data Stats of the asset reported by discovery. + # @!attribute [rw] last_run_duration + # @return [::Google::Protobuf::Duration] + # The duration of the last discovery run. + class DiscoveryStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The aggregated data statistics for the asset reported by discovery. + # @!attribute [rw] data_items + # @return [::Integer] + # The count of data items within the referenced resource. + # @!attribute [rw] data_size + # @return [::Integer] + # The number of stored data bytes within the referenced resource. + # @!attribute [rw] tables + # @return [::Integer] + # The count of table entities within the referenced resource. + # @!attribute [rw] filesets + # @return [::Integer] + # The count of fileset entities within the referenced resource. + class Stats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Current state of discovery. + module 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 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # State of a resource. + module 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 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb new file mode 100644 index 000000000000..4a900722e1cc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # ResourceAccessSpec holds the access control configuration to be enforced + # on the resources, for example, Cloud Storage bucket, BigQuery dataset, + # BigQuery table. + # @!attribute [rw] readers + # @return [::Array<::String>] + # 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. + # @!attribute [rw] writers + # @return [::Array<::String>] + # Optional. The set of principals to be granted writer role on the resource. + # @!attribute [rw] owners + # @return [::Array<::String>] + # Optional. The set of principals to be granted owner role on the resource. + class ResourceAccessSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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. + # @!attribute [rw] readers + # @return [::Array<::String>] + # 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. + class DataAccessSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb new file mode 100644 index 000000000000..00b0c56e0f04 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb @@ -0,0 +1,803 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # Create lake request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] lake_id + # @return [::String] + # 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. + # @!attribute [rw] lake + # @return [::Google::Cloud::Dataplex::V1::Lake] + # Required. Lake resource + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateLakeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update lake request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] lake + # @return [::Google::Cloud::Dataplex::V1::Lake] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateLakeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete lake request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + class DeleteLakeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List lakes request. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListLakesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List lakes response. + # @!attribute [rw] lakes + # @return [::Array<::Google::Cloud::Dataplex::V1::Lake>] + # Lakes under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListLakesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List lake actions request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + class ListLakeActionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List actions response. + # @!attribute [rw] actions + # @return [::Array<::Google::Cloud::Dataplex::V1::Action>] + # Actions under the given parent lake/zone/asset. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListActionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get lake request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + class GetLakeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create zone request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] zone_id + # @return [::String] + # 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") + # @!attribute [rw] zone + # @return [::Google::Cloud::Dataplex::V1::Zone] + # Required. Zone resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update zone request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] zone + # @return [::Google::Cloud::Dataplex::V1::Zone] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete zone request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + class DeleteZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List zones request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListZonesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List zones response. + # @!attribute [rw] zones + # @return [::Array<::Google::Cloud::Dataplex::V1::Zone>] + # Zones under the given parent lake. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListZonesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List zone actions request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + class ListZoneActionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get zone request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + class GetZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create asset request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] asset_id + # @return [::String] + # 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. + # @!attribute [rw] asset + # @return [::Google::Cloud::Dataplex::V1::Asset] + # Required. Asset resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update asset request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] asset + # @return [::Google::Cloud::Dataplex::V1::Asset] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete asset request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + class DeleteAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List assets request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List assets response. + # @!attribute [rw] assets + # @return [::Array<::Google::Cloud::Dataplex::V1::Asset>] + # Asset under the given parent zone. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List asset actions request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + class ListAssetActionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get asset request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + class GetAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of a long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # 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`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create task request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] task_id + # @return [::String] + # Required. Task identifier. + # @!attribute [rw] task + # @return [::Google::Cloud::Dataplex::V1::Task] + # Required. Task resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update task request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] task + # @return [::Google::Cloud::Dataplex::V1::Task] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete task request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + class DeleteTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List tasks request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListTasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List tasks response. + # @!attribute [rw] tasks + # @return [::Array<::Google::Cloud::Dataplex::V1::Task>] + # Tasks under the given parent lake. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListTasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get task request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + class GetTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get job request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + class GetJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # 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. + # @!attribute [rw] args + # @return [::Google::Protobuf::Map{::String => ::String}] + # 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. + class RunTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ArgsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] job + # @return [::Google::Cloud::Dataplex::V1::Job] + # Jobs created by RunTask API. + class RunTaskResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List jobs request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + class ListJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List jobs response. + # @!attribute [rw] jobs + # @return [::Array<::Google::Cloud::Dataplex::V1::Job>] + # Jobs under a given task. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListJobsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Cancel task jobs. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + class CancelJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create environment request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] environment_id + # @return [::String] + # 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. + # @!attribute [rw] environment + # @return [::Google::Cloud::Dataplex::V1::Environment] + # Required. Environment resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateEnvironmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update environment request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] environment + # @return [::Google::Cloud::Dataplex::V1::Environment] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateEnvironmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete environment request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the environment: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + class DeleteEnvironmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List environments request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListEnvironmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List environments response. + # @!attribute [rw] environments + # @return [::Array<::Google::Cloud::Dataplex::V1::Environment>] + # Environments under the given parent lake. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListEnvironmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get environment request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the environment: + # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. + class GetEnvironmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List sessions request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # 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 + class ListSessionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List sessions response. + # @!attribute [rw] sessions + # @return [::Array<::Google::Cloud::Dataplex::V1::Session>] + # Sessions under a given environment. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListSessionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb new file mode 100644 index 000000000000..b18b15ea7b54 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb @@ -0,0 +1,435 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Dataplex + module V1 + # A task represents a user-visible job. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the task, of the form: + # projects/\\{project_number}/locations/\\{location_id}/lakes/\\{lake_id}/ + # tasks/\\{task_id}. + # @!attribute [r] uid + # @return [::String] + # 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. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the task was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the task was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the task. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the task. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the task. + # @!attribute [rw] trigger_spec + # @return [::Google::Cloud::Dataplex::V1::Task::TriggerSpec] + # Required. Spec related to how often and when a task should be triggered. + # @!attribute [rw] execution_spec + # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionSpec] + # Required. Spec related to how a task is executed. + # @!attribute [r] execution_status + # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionStatus] + # Output only. Status of the latest task executions. + # @!attribute [rw] spark + # @return [::Google::Cloud::Dataplex::V1::Task::SparkTaskConfig] + # Config related to running custom Spark tasks. + # @!attribute [rw] notebook + # @return [::Google::Cloud::Dataplex::V1::Task::NotebookTaskConfig] + # Config related to running scheduled Notebooks. + class Task + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for the underlying infrastructure used to run workloads. + # @!attribute [rw] batch + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::BatchComputeResources] + # Compute resources needed for a Task when using Dataproc Serverless. + # @!attribute [rw] container_image + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::ContainerImageRuntime] + # Container Image Runtime Configuration. + # @!attribute [rw] vpc_network + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::VpcNetwork] + # Vpc network. + class InfrastructureSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Batch compute resources associated with the task. + # @!attribute [rw] executors_count + # @return [::Integer] + # Optional. Total number of job executors. + # Executor Count should be between 2 and 100. [Default=2] + # @!attribute [rw] max_executors_count + # @return [::Integer] + # 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] + class BatchComputeResources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container Image Runtime Configuration used with Batch execution. + # @!attribute [rw] image + # @return [::String] + # Optional. Container image to use. + # @!attribute [rw] java_jars + # @return [::Array<::String>] + # 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 + # @!attribute [rw] python_packages + # @return [::Array<::String>] + # 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 + # @!attribute [rw] properties + # @return [::Google::Protobuf::Map{::String => ::String}] + # 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). + class ContainerImageRuntime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class PropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Cloud VPC Network used to run the infrastructure. + # @!attribute [rw] network + # @return [::String] + # Optional. The Cloud VPC network in which the job is run. By default, + # the Cloud VPC network named Default within the project is used. + # @!attribute [rw] sub_network + # @return [::String] + # Optional. The Cloud VPC sub-network in which the job is run. + # @!attribute [rw] network_tags + # @return [::Array<::String>] + # Optional. List of network tags to apply to the job. + class VpcNetwork + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Task scheduling and trigger settings. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Task::TriggerSpec::Type] + # Required. Immutable. Trigger type of the user-specified Task. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # 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. + # @!attribute [rw] disabled + # @return [::Boolean] + # Optional. Prevent the task from executing. + # This does not cancel already running tasks. It is intended to temporarily + # disable RECURRING tasks. + # @!attribute [rw] max_retries + # @return [::Integer] + # Optional. Number of retry attempts before aborting. + # Set to zero to never attempt to retry a failed task. + # @!attribute [rw] schedule + # @return [::String] + # 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. + class TriggerSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Determines how often and when the job will run. + module 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 + end + end + + # Execution related settings, like retry and service_account. + # @!attribute [rw] args + # @return [::Google::Protobuf::Map{::String => ::String}] + # 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. + # @!attribute [rw] service_account + # @return [::String] + # Required. Service account to use to execute a task. + # If not provided, the default Compute service account for the project is + # used. + # @!attribute [rw] project + # @return [::String] + # Optional. The project in which jobs are run. By default, the project + # containing the Lake is used. If a project is provided, the + # {::Google::Cloud::Dataplex::V1::Task::ExecutionSpec#service_account ExecutionSpec.service_account} + # must belong to this project. + # @!attribute [rw] max_job_execution_lifetime + # @return [::Google::Protobuf::Duration] + # Optional. The maximum duration after which the job execution is expired. + # @!attribute [rw] kms_key + # @return [::String] + # 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}`. + class ExecutionSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ArgsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # User-specified config for running a Spark task. + # @!attribute [rw] main_jar_file_uri + # @return [::String] + # 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`). + # @!attribute [rw] main_class + # @return [::String] + # 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`). + # @!attribute [rw] python_script_file + # @return [::String] + # 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`). + # @!attribute [rw] sql_script_file + # @return [::String] + # 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";`). + # @!attribute [rw] sql_script + # @return [::String] + # The query text. + # The execution args are used to declare a set of script variables + # (`set key="value";`). + # @!attribute [rw] file_uris + # @return [::Array<::String>] + # Optional. Cloud Storage URIs of files to be placed in the working + # directory of each executor. + # @!attribute [rw] archive_uris + # @return [::Array<::String>] + # 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. + # @!attribute [rw] infrastructure_spec + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec] + # Optional. Infrastructure specification for the execution. + class SparkTaskConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for running scheduled notebooks. + # @!attribute [rw] notebook + # @return [::String] + # 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`). + # @!attribute [rw] infrastructure_spec + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec] + # Optional. Infrastructure specification for the execution. + # @!attribute [rw] file_uris + # @return [::Array<::String>] + # Optional. Cloud Storage URIs of files to be placed in the working + # directory of each executor. + # @!attribute [rw] archive_uris + # @return [::Array<::String>] + # 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. + class NotebookTaskConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of the task execution (e.g. Jobs). + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update time of the status. + # @!attribute [r] latest_job + # @return [::Google::Cloud::Dataplex::V1::Job] + # Output only. latest job execution + class ExecutionStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A job represents an instance of a task. + # @!attribute [r] name + # @return [::String] + # 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}`. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the job. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the job was started. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the job ended. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::Job::State] + # Output only. Execution state for the job. + # @!attribute [r] retry_count + # @return [::Integer] + # Output only. The number of times the job has been retried (excluding the + # initial attempt). + # @!attribute [r] service + # @return [::Google::Cloud::Dataplex::V1::Job::Service] + # Output only. The underlying service running a job. + # @!attribute [r] service_job + # @return [::String] + # Output only. The full resource name for the job run under a particular + # service. + # @!attribute [r] message + # @return [::String] + # Output only. Additional information about the current state. + # @!attribute [r] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. User-defined labels for the task. + # @!attribute [r] trigger + # @return [::Google::Cloud::Dataplex::V1::Job::Trigger] + # Output only. Job execution trigger. + # @!attribute [r] execution_spec + # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionSpec] + # Output only. Spec related to how a task is executed. + class Job + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + module Service + # Service used to run the job is unspecified. + SERVICE_UNSPECIFIED = 0 + + # Dataproc service is used to run this job. + DATAPROC = 1 + end + + module 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 + end + + # Job execution trigger. + module 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 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..54b83fb82b7d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,164 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc LongRunningRecognize(LongRunningRecognizeRequest) + # returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "LongRunningRecognizeResponse" + # metadata_type: "LongRunningRecognizeMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..fb4d6862eac9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..b5731a824060 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..8c6b19d52e3d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..8e7abcf8f052 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..9e96368be9d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..4ac9c4801a3f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..09acc69b6125 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..41c8c3a565cc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile new file mode 100644 index 000000000000..886d5625e3df --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-dataplex-v1", path: "../" +else + gem "google-cloud-dataplex-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb new file mode 100644 index 000000000000..f36fc0933161 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_CreateAspectType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_aspect_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type. +# +def create_aspect_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new + + # Call the create_aspect_type method. + result = client.create_aspect_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_CreateAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb new file mode 100644 index 000000000000..3f4ccb2d81f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_CreateEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry. +# +def create_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new + + # Call the create_entry method. + result = client.create_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_CreateEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb new file mode 100644 index 000000000000..376349a60218 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_CreateEntryGroup_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_entry_group call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group. +# +def create_entry_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new + + # Call the create_entry_group method. + result = client.create_entry_group request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_CreateEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb new file mode 100644 index 000000000000..314b91f322c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_CreateEntryType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_entry_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type. +# +def create_entry_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new + + # Call the create_entry_type method. + result = client.create_entry_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_CreateEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb new file mode 100644 index 000000000000..362457b5a4b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_DeleteAspectType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_aspect_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type. +# +def delete_aspect_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new + + # Call the delete_aspect_type method. + result = client.delete_aspect_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_DeleteAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb new file mode 100644 index 000000000000..3d1fe413c62c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_DeleteEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry. +# +def delete_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new + + # Call the delete_entry method. + result = client.delete_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_DeleteEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb new file mode 100644 index 000000000000..7246b08a556c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_entry_group call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group. +# +def delete_entry_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new + + # Call the delete_entry_group method. + result = client.delete_entry_group request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb new file mode 100644 index 000000000000..794e94fe2f28 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_DeleteEntryType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_entry_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type. +# +def delete_entry_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new + + # Call the delete_entry_type method. + result = client.delete_entry_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_DeleteEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb new file mode 100644 index 000000000000..fd04921c117d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_GetAspectType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_aspect_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type. +# +def get_aspect_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new + + # Call the get_aspect_type method. + result = client.get_aspect_type request + + # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. + p result +end +# [END dataplex_v1_generated_CatalogService_GetAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb new file mode 100644 index 000000000000..c1abef4d1f90 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_GetEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry. +# +def get_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEntryRequest.new + + # Call the get_entry method. + result = client.get_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_GetEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb new file mode 100644 index 000000000000..6319704f7a07 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_GetEntryGroup_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_entry_group call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group. +# +def get_entry_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new + + # Call the get_entry_group method. + result = client.get_entry_group request + + # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. + p result +end +# [END dataplex_v1_generated_CatalogService_GetEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb new file mode 100644 index 000000000000..ffb3842dffa8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_GetEntryType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_entry_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type. +# +def get_entry_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new + + # Call the get_entry_type method. + result = client.get_entry_type request + + # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. + p result +end +# [END dataplex_v1_generated_CatalogService_GetEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb new file mode 100644 index 000000000000..8bd6fc13947e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_ListAspectTypes_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_aspect_types call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types. +# +def list_aspect_types + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new + + # Call the list_aspect_types method. + result = client.list_aspect_types request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. + p item + end +end +# [END dataplex_v1_generated_CatalogService_ListAspectTypes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb new file mode 100644 index 000000000000..831f4b59a1d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_ListEntries_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_entries call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries. +# +def list_entries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new + + # Call the list_entries method. + result = client.list_entries request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. + p item + end +end +# [END dataplex_v1_generated_CatalogService_ListEntries_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb new file mode 100644 index 000000000000..c43311632377 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_ListEntryGroups_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_entry_groups call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups. +# +def list_entry_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new + + # Call the list_entry_groups method. + result = client.list_entry_groups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. + p item + end +end +# [END dataplex_v1_generated_CatalogService_ListEntryGroups_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb new file mode 100644 index 000000000000..6864cb0191c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_ListEntryTypes_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_entry_types call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types. +# +def list_entry_types + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new + + # Call the list_entry_types method. + result = client.list_entry_types request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. + p item + end +end +# [END dataplex_v1_generated_CatalogService_ListEntryTypes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb new file mode 100644 index 000000000000..a0eb324209fa --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_LookupEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the lookup_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry. +# +def lookup_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new + + # Call the lookup_entry method. + result = client.lookup_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_LookupEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb new file mode 100644 index 000000000000..0cda02b0b5ae --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_SearchEntries_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the search_entries call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries. +# +def search_entries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new + + # Call the search_entries method. + result = client.search_entries request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. + p item + end +end +# [END dataplex_v1_generated_CatalogService_SearchEntries_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb new file mode 100644 index 000000000000..3bd635f8ae9f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_UpdateAspectType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_aspect_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type. +# +def update_aspect_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new + + # Call the update_aspect_type method. + result = client.update_aspect_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_UpdateAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb new file mode 100644 index 000000000000..38c35bdfb614 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_UpdateEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry. +# +def update_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new + + # Call the update_entry method. + result = client.update_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_UpdateEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb new file mode 100644 index 000000000000..14ebf2748edb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_entry_group call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group. +# +def update_entry_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new + + # Call the update_entry_group method. + result = client.update_entry_group request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb new file mode 100644 index 000000000000..6e84f438b832 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_CatalogService_UpdateEntryType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_entry_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type. +# +def update_entry_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new + + # Call the update_entry_type method. + result = client.update_entry_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_UpdateEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb new file mode 100644 index 000000000000..9b30f42a41ad --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_CreateContent_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_content call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#create_content. +# +def create_content + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateContentRequest.new + + # Call the create_content method. + result = client.create_content request + + # The returned object is of type Google::Cloud::Dataplex::V1::Content. + p result +end +# [END dataplex_v1_generated_ContentService_CreateContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb new file mode 100644 index 000000000000..2169aa8d6106 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_DeleteContent_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_content call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#delete_content. +# +def delete_content + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new + + # Call the delete_content method. + result = client.delete_content request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataplex_v1_generated_ContentService_DeleteContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb new file mode 100644 index 000000000000..45684231c227 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_GetContent_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_content call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#get_content. +# +def get_content + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetContentRequest.new + + # Call the get_content method. + result = client.get_content request + + # The returned object is of type Google::Cloud::Dataplex::V1::Content. + p result +end +# [END dataplex_v1_generated_ContentService_GetContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb new file mode 100644 index 000000000000..1b54efd1b16b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_GetIamPolicy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_iam_policy call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END dataplex_v1_generated_ContentService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb new file mode 100644 index 000000000000..180c52eb5d49 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_ListContent_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_content call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#list_content. +# +def list_content + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListContentRequest.new + + # Call the list_content method. + result = client.list_content request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Content. + p item + end +end +# [END dataplex_v1_generated_ContentService_ListContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb new file mode 100644 index 000000000000..fee701099ea8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_SetIamPolicy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the set_iam_policy call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END dataplex_v1_generated_ContentService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb new file mode 100644 index 000000000000..c6b913d91e9d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_TestIamPermissions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the test_iam_permissions call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END dataplex_v1_generated_ContentService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb new file mode 100644 index 000000000000..bc5ad4969c2a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_ContentService_UpdateContent_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_content call in the ContentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::ContentService::Client#update_content. +# +def update_content + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::ContentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new + + # Call the update_content method. + result = client.update_content request + + # The returned object is of type Google::Cloud::Dataplex::V1::Content. + p result +end +# [END dataplex_v1_generated_ContentService_UpdateContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb new file mode 100644 index 000000000000..7ef5da803df4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_CreateDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan. +# +def create_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new + + # Call the create_data_scan method. + result = client.create_data_scan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataScanService_CreateDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb new file mode 100644 index 000000000000..af01e019be16 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_DeleteDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan. +# +def delete_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new + + # Call the delete_data_scan method. + result = client.delete_data_scan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataScanService_DeleteDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb new file mode 100644 index 000000000000..eab1de8202ec --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the generate_data_quality_rules call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules. +# +def generate_data_quality_rules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new + + # Call the generate_data_quality_rules method. + result = client.generate_data_quality_rules request + + # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. + p result +end +# [END dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb new file mode 100644 index 000000000000..dced954461e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_GetDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan. +# +def get_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new + + # Call the get_data_scan method. + result = client.get_data_scan request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. + p result +end +# [END dataplex_v1_generated_DataScanService_GetDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb new file mode 100644 index 000000000000..5e2e0112253e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_GetDataScanJob_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_scan_job call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job. +# +def get_data_scan_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new + + # Call the get_data_scan_job method. + result = client.get_data_scan_job request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. + p result +end +# [END dataplex_v1_generated_DataScanService_GetDataScanJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb new file mode 100644 index 000000000000..1c17e1599263 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_ListDataScanJobs_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_scan_jobs call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs. +# +def list_data_scan_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new + + # Call the list_data_scan_jobs method. + result = client.list_data_scan_jobs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. + p item + end +end +# [END dataplex_v1_generated_DataScanService_ListDataScanJobs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb new file mode 100644 index 000000000000..54ffbe334d01 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_ListDataScans_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_scans call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans. +# +def list_data_scans + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new + + # Call the list_data_scans method. + result = client.list_data_scans request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. + p item + end +end +# [END dataplex_v1_generated_DataScanService_ListDataScans_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb new file mode 100644 index 000000000000..f55818ed8adc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_RunDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the run_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan. +# +def run_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new + + # Call the run_data_scan method. + result = client.run_data_scan request + + # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. + p result +end +# [END dataplex_v1_generated_DataScanService_RunDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb new file mode 100644 index 000000000000..7b26badc2ad8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataScanService_UpdateDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan. +# +def update_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new + + # Call the update_data_scan method. + result = client.update_data_scan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataScanService_UpdateDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb new file mode 100644 index 000000000000..62e0e7f23812 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_data_attribute call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute. +# +def create_data_attribute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new + + # Call the create_data_attribute method. + result = client.create_data_attribute request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb new file mode 100644 index 000000000000..5dabda7bd877 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_data_attribute_binding call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding. +# +def create_data_attribute_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new + + # Call the create_data_attribute_binding method. + result = client.create_data_attribute_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb new file mode 100644 index 000000000000..b7a056141f7c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_data_taxonomy call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy. +# +def create_data_taxonomy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new + + # Call the create_data_taxonomy method. + result = client.create_data_taxonomy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb new file mode 100644 index 000000000000..4d84a87bda45 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_data_attribute call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute. +# +def delete_data_attribute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new + + # Call the delete_data_attribute method. + result = client.delete_data_attribute request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb new file mode 100644 index 000000000000..e970651237e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_data_attribute_binding call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding. +# +def delete_data_attribute_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new + + # Call the delete_data_attribute_binding method. + result = client.delete_data_attribute_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb new file mode 100644 index 000000000000..033d8d48c223 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_data_taxonomy call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy. +# +def delete_data_taxonomy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new + + # Call the delete_data_taxonomy method. + result = client.delete_data_taxonomy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb new file mode 100644 index 000000000000..abe63f31f367 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_attribute call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute. +# +def get_data_attribute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new + + # Call the get_data_attribute method. + result = client.get_data_attribute request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. + p result +end +# [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb new file mode 100644 index 000000000000..8c7d901dad8f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_attribute_binding call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding. +# +def get_data_attribute_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new + + # Call the get_data_attribute_binding method. + result = client.get_data_attribute_binding request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. + p result +end +# [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb new file mode 100644 index 000000000000..7bf0cd32bd75 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_taxonomy call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy. +# +def get_data_taxonomy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new + + # Call the get_data_taxonomy method. + result = client.get_data_taxonomy request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. + p result +end +# [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb new file mode 100644 index 000000000000..fad7c5897a7d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_attribute_bindings call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings. +# +def list_data_attribute_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new + + # Call the list_data_attribute_bindings method. + result = client.list_data_attribute_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. + p item + end +end +# [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb new file mode 100644 index 000000000000..55c9a289ae36 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_attributes call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes. +# +def list_data_attributes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new + + # Call the list_data_attributes method. + result = client.list_data_attributes request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. + p item + end +end +# [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb new file mode 100644 index 000000000000..3e5870ec0258 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_taxonomies call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies. +# +def list_data_taxonomies + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new + + # Call the list_data_taxonomies method. + result = client.list_data_taxonomies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. + p item + end +end +# [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb new file mode 100644 index 000000000000..ee672d4f9dec --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_data_attribute call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute. +# +def update_data_attribute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new + + # Call the update_data_attribute method. + result = client.update_data_attribute request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb new file mode 100644 index 000000000000..a020c8860103 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_data_attribute_binding call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding. +# +def update_data_attribute_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new + + # Call the update_data_attribute_binding method. + result = client.update_data_attribute_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb new file mode 100644 index 000000000000..6985aff5b2c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_data_taxonomy call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy. +# +def update_data_taxonomy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new + + # Call the update_data_taxonomy method. + result = client.update_data_taxonomy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb new file mode 100644 index 000000000000..476f4f673938 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_CancelJob_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the cancel_job call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job. +# +def cancel_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CancelJobRequest.new + + # Call the cancel_job method. + result = client.cancel_job request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataplex_v1_generated_DataplexService_CancelJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb new file mode 100644 index 000000000000..b830cdb49245 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_CreateAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_asset call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset. +# +def create_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new + + # Call the create_asset method. + result = client.create_asset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_CreateAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb new file mode 100644 index 000000000000..cc4ed9ab1745 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_CreateEnvironment_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_environment call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#create_environment. +# +def create_environment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new + + # Call the create_environment method. + result = client.create_environment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_CreateEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb new file mode 100644 index 000000000000..89eac2aa7769 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_CreateLake_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_lake call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake. +# +def create_lake + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new + + # Call the create_lake method. + result = client.create_lake request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_CreateLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb new file mode 100644 index 000000000000..a0ad46d5e011 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_CreateTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#create_task. +# +def create_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new + + # Call the create_task method. + result = client.create_task request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_CreateTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb new file mode 100644 index 000000000000..59801ff23b87 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_CreateZone_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_zone call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone. +# +def create_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new + + # Call the create_zone method. + result = client.create_zone request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_CreateZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb new file mode 100644 index 000000000000..1a298cfcc413 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_DeleteAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_asset call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset. +# +def delete_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new + + # Call the delete_asset method. + result = client.delete_asset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_DeleteAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb new file mode 100644 index 000000000000..924fdce94a2b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_DeleteEnvironment_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_environment call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_environment. +# +def delete_environment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new + + # Call the delete_environment method. + result = client.delete_environment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_DeleteEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb new file mode 100644 index 000000000000..7e48a9f3bc20 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_DeleteLake_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_lake call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake. +# +def delete_lake + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new + + # Call the delete_lake method. + result = client.delete_lake request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_DeleteLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb new file mode 100644 index 000000000000..aeaf3570fdda --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_DeleteTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task. +# +def delete_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new + + # Call the delete_task method. + result = client.delete_task request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_DeleteTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb new file mode 100644 index 000000000000..f091b4f3316e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_DeleteZone_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_zone call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone. +# +def delete_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new + + # Call the delete_zone method. + result = client.delete_zone request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_DeleteZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb new file mode 100644 index 000000000000..ece27d07087a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_GetAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_asset call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset. +# +def get_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetAssetRequest.new + + # Call the get_asset method. + result = client.get_asset request + + # The returned object is of type Google::Cloud::Dataplex::V1::Asset. + p result +end +# [END dataplex_v1_generated_DataplexService_GetAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb new file mode 100644 index 000000000000..3273a7e0da3a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_GetEnvironment_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_environment call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_environment. +# +def get_environment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new + + # Call the get_environment method. + result = client.get_environment request + + # The returned object is of type Google::Cloud::Dataplex::V1::Environment. + p result +end +# [END dataplex_v1_generated_DataplexService_GetEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb new file mode 100644 index 000000000000..26f9422acca1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_GetJob_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_job call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_job. +# +def get_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetJobRequest.new + + # Call the get_job method. + result = client.get_job request + + # The returned object is of type Google::Cloud::Dataplex::V1::Job. + p result +end +# [END dataplex_v1_generated_DataplexService_GetJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb new file mode 100644 index 000000000000..68cf80ffd32a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_GetLake_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_lake call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake. +# +def get_lake + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetLakeRequest.new + + # Call the get_lake method. + result = client.get_lake request + + # The returned object is of type Google::Cloud::Dataplex::V1::Lake. + p result +end +# [END dataplex_v1_generated_DataplexService_GetLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb new file mode 100644 index 000000000000..b23744f5aba3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_GetTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_task. +# +def get_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetTaskRequest.new + + # Call the get_task method. + result = client.get_task request + + # The returned object is of type Google::Cloud::Dataplex::V1::Task. + p result +end +# [END dataplex_v1_generated_DataplexService_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb new file mode 100644 index 000000000000..5773281a042c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_GetZone_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_zone call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone. +# +def get_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetZoneRequest.new + + # Call the get_zone method. + result = client.get_zone request + + # The returned object is of type Google::Cloud::Dataplex::V1::Zone. + p result +end +# [END dataplex_v1_generated_DataplexService_GetZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb new file mode 100644 index 000000000000..3de45de0692c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListAssetActions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_asset_actions call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions. +# +def list_asset_actions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new + + # Call the list_asset_actions method. + result = client.list_asset_actions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListAssetActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb new file mode 100644 index 000000000000..d45ce372dfbe --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListAssets_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_assets call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets. +# +def list_assets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new + + # Call the list_assets method. + result = client.list_assets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb new file mode 100644 index 000000000000..e3b8760b21d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListEnvironments_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_environments call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_environments. +# +def list_environments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new + + # Call the list_environments method. + result = client.list_environments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Environment. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListEnvironments_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb new file mode 100644 index 000000000000..6d71874cd9e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListJobs_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_jobs call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs. +# +def list_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListJobsRequest.new + + # Call the list_jobs method. + result = client.list_jobs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Job. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListJobs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb new file mode 100644 index 000000000000..2cbe46f9ec50 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListLakeActions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_lake_actions call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions. +# +def list_lake_actions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new + + # Call the list_lake_actions method. + result = client.list_lake_actions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListLakeActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb new file mode 100644 index 000000000000..32b87c2dd3af --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListLakes_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_lakes call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes. +# +def list_lakes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListLakesRequest.new + + # Call the list_lakes method. + result = client.list_lakes request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListLakes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb new file mode 100644 index 000000000000..04d0ae4da992 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListSessions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_sessions call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_sessions. +# +def list_sessions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new + + # Call the list_sessions method. + result = client.list_sessions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Session. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListSessions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb new file mode 100644 index 000000000000..41affa17810a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListTasks_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_tasks call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks. +# +def list_tasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListTasksRequest.new + + # Call the list_tasks method. + result = client.list_tasks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Task. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb new file mode 100644 index 000000000000..c6ab49811f0e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListZoneActions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_zone_actions call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions. +# +def list_zone_actions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new + + # Call the list_zone_actions method. + result = client.list_zone_actions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListZoneActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb new file mode 100644 index 000000000000..aba04972dae0 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_ListZones_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_zones call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones. +# +def list_zones + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListZonesRequest.new + + # Call the list_zones method. + result = client.list_zones request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListZones_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb new file mode 100644 index 000000000000..bf51744559b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_RunTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the run_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#run_task. +# +def run_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::RunTaskRequest.new + + # Call the run_task method. + result = client.run_task request + + # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. + p result +end +# [END dataplex_v1_generated_DataplexService_RunTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb new file mode 100644 index 000000000000..07a02bd339b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_UpdateAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_asset call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset. +# +def update_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new + + # Call the update_asset method. + result = client.update_asset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_UpdateAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb new file mode 100644 index 000000000000..bf327a685bca --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_UpdateEnvironment_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_environment call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#update_environment. +# +def update_environment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new + + # Call the update_environment method. + result = client.update_environment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_UpdateEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb new file mode 100644 index 000000000000..d4dda821cac2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_UpdateLake_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_lake call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake. +# +def update_lake + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new + + # Call the update_lake method. + result = client.update_lake request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_UpdateLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb new file mode 100644 index 000000000000..3440b1c8c05e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_UpdateTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#update_task. +# +def update_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new + + # Call the update_task method. + result = client.update_task request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_UpdateTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb new file mode 100644 index 000000000000..9ab74438a946 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataplexService_UpdateZone_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_zone call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone. +# +def update_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new + + # Call the update_zone method. + result = client.update_zone request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_UpdateZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb new file mode 100644 index 000000000000..f19b23bf2929 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_CreateEntity_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_entity call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity. +# +def create_entity + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEntityRequest.new + + # Call the create_entity method. + result = client.create_entity request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + p result +end +# [END dataplex_v1_generated_MetadataService_CreateEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb new file mode 100644 index 000000000000..7eaff8ebc340 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_CreatePartition_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_partition call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition. +# +def create_partition + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new + + # Call the create_partition method. + result = client.create_partition request + + # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + p result +end +# [END dataplex_v1_generated_MetadataService_CreatePartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb new file mode 100644 index 000000000000..6269c6757544 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_DeleteEntity_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_entity call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity. +# +def delete_entity + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new + + # Call the delete_entity method. + result = client.delete_entity request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataplex_v1_generated_MetadataService_DeleteEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb new file mode 100644 index 000000000000..31b484f3720d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_DeletePartition_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_partition call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition. +# +def delete_partition + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new + + # Call the delete_partition method. + result = client.delete_partition request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataplex_v1_generated_MetadataService_DeletePartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb new file mode 100644 index 000000000000..9d31a3e13b07 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_GetEntity_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_entity call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity. +# +def get_entity + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEntityRequest.new + + # Call the get_entity method. + result = client.get_entity request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + p result +end +# [END dataplex_v1_generated_MetadataService_GetEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb new file mode 100644 index 000000000000..278958c7dba3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_GetPartition_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_partition call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition. +# +def get_partition + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new + + # Call the get_partition method. + result = client.get_partition request + + # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + p result +end +# [END dataplex_v1_generated_MetadataService_GetPartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb new file mode 100644 index 000000000000..a584b2b7d4df --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_ListEntities_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_entities call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities. +# +def list_entities + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new + + # Call the list_entities method. + result = client.list_entities request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. + p item + end +end +# [END dataplex_v1_generated_MetadataService_ListEntities_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb new file mode 100644 index 000000000000..b956ff846f47 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_ListPartitions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_partitions call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions. +# +def list_partitions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new + + # Call the list_partitions method. + result = client.list_partitions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. + p item + end +end +# [END dataplex_v1_generated_MetadataService_ListPartitions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb new file mode 100644 index 000000000000..78a3c2e43ade --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_MetadataService_UpdateEntity_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_entity call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity. +# +def update_entity + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new + + # Call the update_entity method. + result = client.update_entity request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + p result +end +# [END dataplex_v1_generated_MetadataService_UpdateEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json b/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json new file mode 100644 index 000000000000..e45d8ca85b2e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json @@ -0,0 +1,3855 @@ +{ + "client_library": { + "name": "google-cloud-dataplex-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.dataplex.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "dataplex_v1_generated_DataplexService_CreateLake_sync", + "title": "Snippet for the create_lake call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake.", + "file": "dataplex_service/create_lake.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_lake", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateLakeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CreateLake", + "full_name": "google.cloud.dataplex.v1.DataplexService.CreateLake", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_UpdateLake_sync", + "title": "Snippet for the update_lake call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake.", + "file": "dataplex_service/update_lake.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_lake", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateLakeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "UpdateLake", + "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateLake", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_DeleteLake_sync", + "title": "Snippet for the delete_lake call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake.", + "file": "dataplex_service/delete_lake.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_lake", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteLakeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "DeleteLake", + "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteLake", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListLakes_sync", + "title": "Snippet for the list_lakes call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes.", + "file": "dataplex_service/list_lakes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_lakes", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListLakesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListLakesResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListLakes", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListLakes", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetLake_sync", + "title": "Snippet for the get_lake call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake.", + "file": "dataplex_service/get_lake.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lake", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetLakeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Lake", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetLake", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetLake", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListLakeActions_sync", + "title": "Snippet for the list_lake_actions call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions.", + "file": "dataplex_service/list_lake_actions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_lake_actions", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListLakeActionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListLakeActions", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_CreateZone_sync", + "title": "Snippet for the create_zone call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone.", + "file": "dataplex_service/create_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_zone", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CreateZone", + "full_name": "google.cloud.dataplex.v1.DataplexService.CreateZone", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_UpdateZone_sync", + "title": "Snippet for the update_zone call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone.", + "file": "dataplex_service/update_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_zone", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "UpdateZone", + "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateZone", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_DeleteZone_sync", + "title": "Snippet for the delete_zone call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone.", + "file": "dataplex_service/delete_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_zone", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "DeleteZone", + "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteZone", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListZones_sync", + "title": "Snippet for the list_zones call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones.", + "file": "dataplex_service/list_zones.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_zones", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListZonesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListZonesResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListZones", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListZones", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetZone_sync", + "title": "Snippet for the get_zone call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone.", + "file": "dataplex_service/get_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_zone", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Zone", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetZone", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetZone", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListZoneActions_sync", + "title": "Snippet for the list_zone_actions call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions.", + "file": "dataplex_service/list_zone_actions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_zone_actions", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListZoneActionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListZoneActions", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_CreateAsset_sync", + "title": "Snippet for the create_asset call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset.", + "file": "dataplex_service/create_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CreateAsset", + "full_name": "google.cloud.dataplex.v1.DataplexService.CreateAsset", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_UpdateAsset_sync", + "title": "Snippet for the update_asset call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset.", + "file": "dataplex_service/update_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "UpdateAsset", + "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_DeleteAsset_sync", + "title": "Snippet for the delete_asset call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset.", + "file": "dataplex_service/delete_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "DeleteAsset", + "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListAssets_sync", + "title": "Snippet for the list_assets call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets.", + "file": "dataplex_service/list_assets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_assets", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListAssetsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListAssets", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListAssets", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetAsset_sync", + "title": "Snippet for the get_asset call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset.", + "file": "dataplex_service/get_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Asset", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetAsset", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetAsset", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListAssetActions_sync", + "title": "Snippet for the list_asset_actions call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions.", + "file": "dataplex_service/list_asset_actions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_asset_actions", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListAssetActionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListAssetActions", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_CreateTask_sync", + "title": "Snippet for the create_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_task.", + "file": "dataplex_service/create_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CreateTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.CreateTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_UpdateTask_sync", + "title": "Snippet for the update_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_task.", + "file": "dataplex_service/update_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "UpdateTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_DeleteTask_sync", + "title": "Snippet for the delete_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task.", + "file": "dataplex_service/delete_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "DeleteTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListTasks_sync", + "title": "Snippet for the list_tasks call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks.", + "file": "dataplex_service/list_tasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tasks", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListTasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListTasksResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListTasks", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListTasks", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetTask_sync", + "title": "Snippet for the get_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_task.", + "file": "dataplex_service/get_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Task", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListJobs_sync", + "title": "Snippet for the list_jobs call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs.", + "file": "dataplex_service/list_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_jobs", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListJobsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListJobs", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListJobs", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_RunTask_sync", + "title": "Snippet for the run_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#run_task.", + "file": "dataplex_service/run_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#run_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::RunTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::RunTaskResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "RunTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.RunTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetJob_sync", + "title": "Snippet for the get_job call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_job.", + "file": "dataplex_service/get_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_job", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Job", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetJob", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetJob", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_CancelJob_sync", + "title": "Snippet for the cancel_job call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job.", + "file": "dataplex_service/cancel_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_job", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CancelJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CancelJob", + "full_name": "google.cloud.dataplex.v1.DataplexService.CancelJob", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_CreateEnvironment_sync", + "title": "Snippet for the create_environment call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_environment.", + "file": "dataplex_service/create_environment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_environment", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_environment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CreateEnvironment", + "full_name": "google.cloud.dataplex.v1.DataplexService.CreateEnvironment", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_UpdateEnvironment_sync", + "title": "Snippet for the update_environment call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_environment.", + "file": "dataplex_service/update_environment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_environment", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_environment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "UpdateEnvironment", + "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateEnvironment", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_DeleteEnvironment_sync", + "title": "Snippet for the delete_environment call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_environment.", + "file": "dataplex_service/delete_environment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_environment", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_environment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "DeleteEnvironment", + "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteEnvironment", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListEnvironments_sync", + "title": "Snippet for the list_environments call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_environments.", + "file": "dataplex_service/list_environments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_environments", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_environments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListEnvironments", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListEnvironments", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetEnvironment_sync", + "title": "Snippet for the get_environment call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_environment.", + "file": "dataplex_service/get_environment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_environment", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_environment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEnvironmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Environment", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetEnvironment", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetEnvironment", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListSessions_sync", + "title": "Snippet for the list_sessions call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_sessions.", + "file": "dataplex_service/list_sessions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sessions", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_sessions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListSessionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListSessionsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListSessions", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListSessions", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_CreateEntryType_sync", + "title": "Snippet for the create_entry_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type.", + "file": "catalog_service/create_entry_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_entry_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CreateEntryType", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntryType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntryType_sync", + "title": "Snippet for the update_entry_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type.", + "file": "catalog_service/update_entry_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_entry_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "UpdateEntryType", + "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntryType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntryType_sync", + "title": "Snippet for the delete_entry_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type.", + "file": "catalog_service/delete_entry_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_entry_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "DeleteEntryType", + "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntryType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_ListEntryTypes_sync", + "title": "Snippet for the list_entry_types call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types.", + "file": "catalog_service/list_entry_types.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_entry_types", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEntryTypesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEntryTypesResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "ListEntryTypes", + "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntryTypes", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_GetEntryType_sync", + "title": "Snippet for the get_entry_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type.", + "file": "catalog_service/get_entry_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_entry_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEntryTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::EntryType", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "GetEntryType", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntryType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_CreateAspectType_sync", + "title": "Snippet for the create_aspect_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type.", + "file": "catalog_service/create_aspect_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_aspect_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CreateAspectType", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateAspectType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_UpdateAspectType_sync", + "title": "Snippet for the update_aspect_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type.", + "file": "catalog_service/update_aspect_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_aspect_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "UpdateAspectType", + "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateAspectType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_DeleteAspectType_sync", + "title": "Snippet for the delete_aspect_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type.", + "file": "catalog_service/delete_aspect_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_aspect_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "DeleteAspectType", + "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteAspectType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_ListAspectTypes_sync", + "title": "Snippet for the list_aspect_types call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types.", + "file": "catalog_service/list_aspect_types.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_aspect_types", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListAspectTypesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListAspectTypesResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "ListAspectTypes", + "full_name": "google.cloud.dataplex.v1.CatalogService.ListAspectTypes", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_GetAspectType_sync", + "title": "Snippet for the get_aspect_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type.", + "file": "catalog_service/get_aspect_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_aspect_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetAspectTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::AspectType", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "GetAspectType", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetAspectType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_CreateEntryGroup_sync", + "title": "Snippet for the create_entry_group call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group.", + "file": "catalog_service/create_entry_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_entry_group", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CreateEntryGroup", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntryGroup", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync", + "title": "Snippet for the update_entry_group call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group.", + "file": "catalog_service/update_entry_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_entry_group", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "UpdateEntryGroup", + "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntryGroup", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync", + "title": "Snippet for the delete_entry_group call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group.", + "file": "catalog_service/delete_entry_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_entry_group", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "DeleteEntryGroup", + "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntryGroup", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_ListEntryGroups_sync", + "title": "Snippet for the list_entry_groups call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups.", + "file": "catalog_service/list_entry_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_entry_groups", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "ListEntryGroups", + "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntryGroups", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_GetEntryGroup_sync", + "title": "Snippet for the get_entry_group call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group.", + "file": "catalog_service/get_entry_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_entry_group", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEntryGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::EntryGroup", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "GetEntryGroup", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntryGroup", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_CreateEntry_sync", + "title": "Snippet for the create_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry.", + "file": "catalog_service/create_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CreateEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntry_sync", + "title": "Snippet for the update_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry.", + "file": "catalog_service/update_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "UpdateEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntry_sync", + "title": "Snippet for the delete_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry.", + "file": "catalog_service/delete_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "DeleteEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_ListEntries_sync", + "title": "Snippet for the list_entries call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries.", + "file": "catalog_service/list_entries.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_entries", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEntriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEntriesResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "ListEntries", + "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntries", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_GetEntry_sync", + "title": "Snippet for the get_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry.", + "file": "catalog_service/get_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "GetEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_LookupEntry_sync", + "title": "Snippet for the lookup_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry.", + "file": "catalog_service/lookup_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "lookup_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::LookupEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "LookupEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.LookupEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_SearchEntries_sync", + "title": "Snippet for the search_entries call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries.", + "file": "catalog_service/search_entries.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_entries", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::SearchEntriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::SearchEntriesResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "SearchEntries", + "full_name": "google.cloud.dataplex.v1.CatalogService.SearchEntries", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_CreateContent_sync", + "title": "Snippet for the create_content call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#create_content.", + "file": "content_service/create_content.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_content", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#create_content", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateContentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Content", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "CreateContent", + "full_name": "google.cloud.dataplex.v1.ContentService.CreateContent", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_UpdateContent_sync", + "title": "Snippet for the update_content call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#update_content.", + "file": "content_service/update_content.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_content", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#update_content", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateContentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Content", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "UpdateContent", + "full_name": "google.cloud.dataplex.v1.ContentService.UpdateContent", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_DeleteContent_sync", + "title": "Snippet for the delete_content call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#delete_content.", + "file": "content_service/delete_content.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_content", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#delete_content", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteContentRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "DeleteContent", + "full_name": "google.cloud.dataplex.v1.ContentService.DeleteContent", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_GetContent_sync", + "title": "Snippet for the get_content call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#get_content.", + "file": "content_service/get_content.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_content", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#get_content", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetContentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Content", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "GetContent", + "full_name": "google.cloud.dataplex.v1.ContentService.GetContent", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#get_iam_policy.", + "file": "content_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.dataplex.v1.ContentService.GetIamPolicy", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#set_iam_policy.", + "file": "content_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.dataplex.v1.ContentService.SetIamPolicy", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#test_iam_permissions.", + "file": "content_service/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.dataplex.v1.ContentService.TestIamPermissions", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_ContentService_ListContent_sync", + "title": "Snippet for the list_content call in the ContentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#list_content.", + "file": "content_service/list_content.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_content", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#list_content", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListContentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListContentResponse", + "client": { + "short_name": "ContentService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + }, + "method": { + "short_name": "ListContent", + "full_name": "google.cloud.dataplex.v1.ContentService.ListContent", + "service": { + "short_name": "ContentService", + "full_name": "google.cloud.dataplex.v1.ContentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync", + "title": "Snippet for the create_data_taxonomy call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy.", + "file": "data_taxonomy_service/create_data_taxonomy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_taxonomy", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "CreateDataTaxonomy", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataTaxonomy", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync", + "title": "Snippet for the update_data_taxonomy call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy.", + "file": "data_taxonomy_service/update_data_taxonomy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_taxonomy", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "UpdateDataTaxonomy", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataTaxonomy", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync", + "title": "Snippet for the delete_data_taxonomy call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy.", + "file": "data_taxonomy_service/delete_data_taxonomy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_taxonomy", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "DeleteDataTaxonomy", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataTaxonomy", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync", + "title": "Snippet for the list_data_taxonomies call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies.", + "file": "data_taxonomy_service/list_data_taxonomies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_taxonomies", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "ListDataTaxonomies", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataTaxonomies", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync", + "title": "Snippet for the get_data_taxonomy call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy.", + "file": "data_taxonomy_service/get_data_taxonomy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_taxonomy", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataTaxonomy", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "GetDataTaxonomy", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataTaxonomy", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync", + "title": "Snippet for the create_data_attribute_binding call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding.", + "file": "data_taxonomy_service/create_data_attribute_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_attribute_binding", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "CreateDataAttributeBinding", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeBinding", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync", + "title": "Snippet for the update_data_attribute_binding call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding.", + "file": "data_taxonomy_service/update_data_attribute_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_attribute_binding", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "UpdateDataAttributeBinding", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeBinding", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync", + "title": "Snippet for the delete_data_attribute_binding call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding.", + "file": "data_taxonomy_service/delete_data_attribute_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_attribute_binding", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "DeleteDataAttributeBinding", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeBinding", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync", + "title": "Snippet for the list_data_attribute_bindings call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings.", + "file": "data_taxonomy_service/list_data_attribute_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_attribute_bindings", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "ListDataAttributeBindings", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributeBindings", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync", + "title": "Snippet for the get_data_attribute_binding call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding.", + "file": "data_taxonomy_service/get_data_attribute_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_attribute_binding", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataAttributeBinding", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "GetDataAttributeBinding", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeBinding", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync", + "title": "Snippet for the create_data_attribute call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute.", + "file": "data_taxonomy_service/create_data_attribute.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_attribute", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "CreateDataAttribute", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttribute", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync", + "title": "Snippet for the update_data_attribute call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute.", + "file": "data_taxonomy_service/update_data_attribute.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_attribute", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "UpdateDataAttribute", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttribute", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync", + "title": "Snippet for the delete_data_attribute call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute.", + "file": "data_taxonomy_service/delete_data_attribute.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_attribute", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "DeleteDataAttribute", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttribute", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync", + "title": "Snippet for the list_data_attributes call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes.", + "file": "data_taxonomy_service/list_data_attributes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_attributes", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataAttributesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataAttributesResponse", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "ListDataAttributes", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributes", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync", + "title": "Snippet for the get_data_attribute call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute.", + "file": "data_taxonomy_service/get_data_attribute.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_attribute", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataAttributeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataAttribute", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "GetDataAttribute", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttribute", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_CreateDataScan_sync", + "title": "Snippet for the create_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan.", + "file": "data_scan_service/create_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "CreateDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.CreateDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_UpdateDataScan_sync", + "title": "Snippet for the update_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan.", + "file": "data_scan_service/update_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "UpdateDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.UpdateDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_DeleteDataScan_sync", + "title": "Snippet for the delete_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan.", + "file": "data_scan_service/delete_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "DeleteDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.DeleteDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_GetDataScan_sync", + "title": "Snippet for the get_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan.", + "file": "data_scan_service/get_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataScan", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "GetDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.GetDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_ListDataScans_sync", + "title": "Snippet for the list_data_scans call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans.", + "file": "data_scan_service/list_data_scans.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_scans", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataScansRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataScansResponse", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "ListDataScans", + "full_name": "google.cloud.dataplex.v1.DataScanService.ListDataScans", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_RunDataScan_sync", + "title": "Snippet for the run_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan.", + "file": "data_scan_service/run_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::RunDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::RunDataScanResponse", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "RunDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.RunDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_GetDataScanJob_sync", + "title": "Snippet for the get_data_scan_job call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job.", + "file": "data_scan_service/get_data_scan_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_scan_job", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataScanJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataScanJob", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "GetDataScanJob", + "full_name": "google.cloud.dataplex.v1.DataScanService.GetDataScanJob", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_ListDataScanJobs_sync", + "title": "Snippet for the list_data_scan_jobs call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs.", + "file": "data_scan_service/list_data_scan_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_scan_jobs", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "ListDataScanJobs", + "full_name": "google.cloud.dataplex.v1.DataScanService.ListDataScanJobs", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync", + "title": "Snippet for the generate_data_quality_rules call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules.", + "file": "data_scan_service/generate_data_quality_rules.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_data_quality_rules", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "GenerateDataQualityRules", + "full_name": "google.cloud.dataplex.v1.DataScanService.GenerateDataQualityRules", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_CreateEntity_sync", + "title": "Snippet for the create_entity call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity.", + "file": "metadata_service/create_entity.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_entity", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEntityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entity", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "CreateEntity", + "full_name": "google.cloud.dataplex.v1.MetadataService.CreateEntity", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_UpdateEntity_sync", + "title": "Snippet for the update_entity call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity.", + "file": "metadata_service/update_entity.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_entity", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEntityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entity", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "UpdateEntity", + "full_name": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_DeleteEntity_sync", + "title": "Snippet for the delete_entity call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity.", + "file": "metadata_service/delete_entity.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_entity", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEntityRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "DeleteEntity", + "full_name": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_GetEntity_sync", + "title": "Snippet for the get_entity call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity.", + "file": "metadata_service/get_entity.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_entity", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEntityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entity", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "GetEntity", + "full_name": "google.cloud.dataplex.v1.MetadataService.GetEntity", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_ListEntities_sync", + "title": "Snippet for the list_entities call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities.", + "file": "metadata_service/list_entities.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_entities", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEntitiesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEntitiesResponse", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "ListEntities", + "full_name": "google.cloud.dataplex.v1.MetadataService.ListEntities", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_CreatePartition_sync", + "title": "Snippet for the create_partition call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition.", + "file": "metadata_service/create_partition.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_partition", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreatePartitionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Partition", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "CreatePartition", + "full_name": "google.cloud.dataplex.v1.MetadataService.CreatePartition", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_DeletePartition_sync", + "title": "Snippet for the delete_partition call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition.", + "file": "metadata_service/delete_partition.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_partition", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeletePartitionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "DeletePartition", + "full_name": "google.cloud.dataplex.v1.MetadataService.DeletePartition", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_GetPartition_sync", + "title": "Snippet for the get_partition call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition.", + "file": "metadata_service/get_partition.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_partition", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetPartitionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Partition", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "GetPartition", + "full_name": "google.cloud.dataplex.v1.MetadataService.GetPartition", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_ListPartitions_sync", + "title": "Snippet for the list_partitions call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions.", + "file": "metadata_service/list_partitions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_partitions", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListPartitionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListPartitionsResponse", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "ListPartitions", + "full_name": "google.cloud.dataplex.v1.MetadataService.ListPartitions", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb new file mode 100644 index 000000000000..d65a7794ef93 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb @@ -0,0 +1,389 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/catalog_pb" +require "google/cloud/dataplex/v1/catalog_services_pb" +require "google/cloud/dataplex/v1/catalog_service" + +class ::Google::Cloud::Dataplex::V1::CatalogService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb new file mode 100644 index 000000000000..c1f09a9564e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb @@ -0,0 +1,95 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/catalog_service" + +class ::Google::Cloud::Dataplex::V1::CatalogService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_aspect_type_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.aspect_type_path project: "value0", location: "value1", aspect_type: "value2" + assert_equal "projects/value0/locations/value1/aspectTypes/value2", path + end + end + + def test_entry_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entry_path project: "value0", location: "value1", entry_group: "value2", entry: "value3" + assert_equal "projects/value0/locations/value1/entryGroups/value2/entries/value3", path + end + end + + def test_entry_group_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entry_group_path project: "value0", location: "value1", entry_group: "value2" + assert_equal "projects/value0/locations/value1/entryGroups/value2", path + end + end + + def test_entry_type_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entry_type_path project: "value0", location: "value1", entry_type: "value2" + assert_equal "projects/value0/locations/value1/entryTypes/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb new file mode 100644 index 000000000000..9d3d20667729 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb @@ -0,0 +1,1330 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/dataplex/v1/catalog_pb" +require "google/cloud/dataplex/v1/catalog_service/rest" + + +class ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_entry_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_type_id = "hello world" + entry_type = {} + validate_only = true + + create_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_entry_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_entry_type parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_entry_type ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_entry_type(::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_entry_type_client_stub.call_count + end + end + end + + def test_update_entry_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + entry_type = {} + update_mask = {} + validate_only = true + + update_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_entry_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_entry_type entry_type: entry_type, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_entry_type ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_entry_type(::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_entry_type_client_stub.call_count + end + end + end + + def test_delete_entry_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_entry_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_entry_type({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_entry_type name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_entry_type ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_entry_type({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_entry_type(::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_entry_type_client_stub.call_count + end + end + end + + def test_list_entry_types + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_entry_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_entry_types_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_entry_types_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_entry_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_entry_types ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_entry_types(::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_entry_types_client_stub.call_count + end + end + end + + def test_get_entry_type + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::EntryType.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_entry_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_entry_type({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_entry_type name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_entry_type ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_entry_type({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_entry_type(::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_entry_type_client_stub.call_count + end + end + end + + def test_create_aspect_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + aspect_type_id = "hello world" + aspect_type = {} + validate_only = true + + create_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_aspect_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_aspect_type parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_aspect_type ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_aspect_type(::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_aspect_type_client_stub.call_count + end + end + end + + def test_update_aspect_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + aspect_type = {} + update_mask = {} + validate_only = true + + update_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_aspect_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_aspect_type aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_aspect_type ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_aspect_type(::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_aspect_type_client_stub.call_count + end + end + end + + def test_delete_aspect_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_aspect_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_aspect_type({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_aspect_type name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_aspect_type ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_aspect_type({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_aspect_type(::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_aspect_type_client_stub.call_count + end + end + end + + def test_list_aspect_types + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_aspect_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_aspect_types_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_aspect_types_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_aspect_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_aspect_types ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_aspect_types(::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_aspect_types_client_stub.call_count + end + end + end + + def test_get_aspect_type + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::AspectType.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_aspect_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_aspect_type({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_aspect_type name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_aspect_type ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_aspect_type({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_aspect_type(::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_aspect_type_client_stub.call_count + end + end + end + + def test_create_entry_group + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_group_id = "hello world" + entry_group = {} + validate_only = true + + create_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_entry_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_entry_group parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_entry_group ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_entry_group(::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_entry_group_client_stub.call_count + end + end + end + + def test_update_entry_group + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + entry_group = {} + update_mask = {} + validate_only = true + + update_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_entry_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_entry_group entry_group: entry_group, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_entry_group ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_entry_group(::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_entry_group_client_stub.call_count + end + end + end + + def test_delete_entry_group + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_entry_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_entry_group({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_entry_group name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_entry_group ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_entry_group({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_entry_group(::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_entry_group_client_stub.call_count + end + end + end + + def test_list_entry_groups + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_entry_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_entry_groups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_entry_groups_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_entry_groups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_entry_groups ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_entry_groups(::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_entry_groups_client_stub.call_count + end + end + end + + def test_get_entry_group + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::EntryGroup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_entry_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_entry_group({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_entry_group name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_entry_group ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_entry_group({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_entry_group(::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_entry_group_client_stub.call_count + end + end + end + + def test_create_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_id = "hello world" + entry = {} + + create_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_entry parent: parent, entry_id: entry_id, entry: entry do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_entry ::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_entry(::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_entry_client_stub.call_count + end + end + end + + def test_update_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + entry = {} + update_mask = {} + allow_missing = true + delete_missing_aspects = true + aspect_keys = ["hello world"] + + update_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_entry entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_entry ::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_entry(::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_entry_client_stub.call_count + end + end + end + + def test_delete_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_entry({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_entry name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_entry ::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_entry({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_entry(::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_entry_client_stub.call_count + end + end + end + + def test_list_entries + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_entries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_entries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_entries_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_entries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_entries ::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_entries(::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_entries_client_stub.call_count + end + end + end + + def test_get_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTRY_VIEW_UNSPECIFIED + aspect_types = ["hello world"] + paths = ["hello world"] + + get_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_entry name: name, view: view, aspect_types: aspect_types, paths: paths do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_entry ::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_entry(::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_entry_client_stub.call_count + end + end + end + + def test_lookup_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTRY_VIEW_UNSPECIFIED + aspect_types = ["hello world"] + paths = ["hello world"] + entry = "hello world" + + lookup_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_lookup_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lookup_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.lookup_entry name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.lookup_entry ::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.lookup_entry(::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, lookup_entry_client_stub.call_count + end + end + end + + def test_search_entries + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + scope = "hello world" + + search_entries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_search_entries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_entries_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_entries_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb new file mode 100644 index 000000000000..9d74d6473f35 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb @@ -0,0 +1,1538 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/catalog_pb" +require "google/cloud/dataplex/v1/catalog_services_pb" +require "google/cloud/dataplex/v1/catalog_service" + +class ::Google::Cloud::Dataplex::V1::CatalogService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_entry_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_type_id = "hello world" + entry_type = {} + validate_only = true + + create_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_entry_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["entry_type_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryType), request["entry_type"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_entry_type parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_entry_type ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_entry_type(::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_entry_type_client_stub.call_rpc_count + end + end + + def test_update_entry_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + entry_type = {} + update_mask = {} + validate_only = true + + update_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_entry_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryType), request["entry_type"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_entry_type entry_type: entry_type, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_entry_type ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_entry_type(::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_entry_type_client_stub.call_rpc_count + end + end + + def test_delete_entry_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_entry_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_entry_type({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_entry_type name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_entry_type ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_entry_type({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_entry_type(::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_entry_type_client_stub.call_rpc_count + end + end + + def test_list_entry_types + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_entry_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_entry_types, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_entry_types_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_entry_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_entry_types ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_entry_types(::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_entry_types_client_stub.call_rpc_count + end + end + + def test_get_entry_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::EntryType.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_entry_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_entry_type({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_entry_type name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_entry_type ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_entry_type({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_entry_type(::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_entry_type_client_stub.call_rpc_count + end + end + + def test_create_aspect_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + aspect_type_id = "hello world" + aspect_type = {} + validate_only = true + + create_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_aspect_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["aspect_type_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::AspectType), request["aspect_type"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_aspect_type parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_aspect_type ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_aspect_type(::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_aspect_type_client_stub.call_rpc_count + end + end + + def test_update_aspect_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + aspect_type = {} + update_mask = {} + validate_only = true + + update_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_aspect_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::AspectType), request["aspect_type"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_aspect_type aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_aspect_type ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_aspect_type(::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_aspect_type_client_stub.call_rpc_count + end + end + + def test_delete_aspect_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_aspect_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_aspect_type({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_aspect_type name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_aspect_type ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_aspect_type({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_aspect_type(::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_aspect_type_client_stub.call_rpc_count + end + end + + def test_list_aspect_types + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_aspect_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_aspect_types, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_aspect_types_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_aspect_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_aspect_types ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_aspect_types(::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_aspect_types_client_stub.call_rpc_count + end + end + + def test_get_aspect_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::AspectType.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_aspect_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_aspect_type({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_aspect_type name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_aspect_type ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_aspect_type({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_aspect_type(::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_aspect_type_client_stub.call_rpc_count + end + end + + def test_create_entry_group + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_group_id = "hello world" + entry_group = {} + validate_only = true + + create_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_entry_group, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["entry_group_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryGroup), request["entry_group"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_entry_group parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_entry_group ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_entry_group(::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_entry_group_client_stub.call_rpc_count + end + end + + def test_update_entry_group + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + entry_group = {} + update_mask = {} + validate_only = true + + update_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_entry_group, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryGroup), request["entry_group"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_entry_group entry_group: entry_group, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_entry_group ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_entry_group(::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_entry_group_client_stub.call_rpc_count + end + end + + def test_delete_entry_group + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_entry_group, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_entry_group({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_entry_group name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_entry_group ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_entry_group({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_entry_group(::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_entry_group_client_stub.call_rpc_count + end + end + + def test_list_entry_groups + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_entry_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_entry_groups, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_entry_groups_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_entry_groups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_entry_groups ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_entry_groups(::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_entry_groups_client_stub.call_rpc_count + end + end + + def test_get_entry_group + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::EntryGroup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_entry_group, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_entry_group({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_entry_group name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_entry_group ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_entry_group({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_entry_group(::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_entry_group_client_stub.call_rpc_count + end + end + + def test_create_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_id = "hello world" + entry = {} + + create_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["entry_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entry), request["entry"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_entry parent: parent, entry_id: entry_id, entry: entry do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_entry ::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_entry(::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_entry_client_stub.call_rpc_count + end + end + + def test_update_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + entry = {} + update_mask = {} + allow_missing = true + delete_missing_aspects = true + aspect_keys = ["hello world"] + + update_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entry), request["entry"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["allow_missing"] + assert_equal true, request["delete_missing_aspects"] + assert_equal ["hello world"], request["aspect_keys"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_entry entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_entry ::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_entry(::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_entry_client_stub.call_rpc_count + end + end + + def test_delete_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_entry({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_entry name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_entry ::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_entry({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_entry(::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_entry_client_stub.call_rpc_count + end + end + + def test_list_entries + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_entries, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntriesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_entries_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_entries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_entries ::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_entries(::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_entries_client_stub.call_rpc_count + end + end + + def test_get_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTRY_VIEW_UNSPECIFIED + aspect_types = ["hello world"] + paths = ["hello world"] + + get_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryRequest, request + assert_equal "hello world", request["name"] + assert_equal :ENTRY_VIEW_UNSPECIFIED, request["view"] + assert_equal ["hello world"], request["aspect_types"] + assert_equal ["hello world"], request["paths"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_entry name: name, view: view, aspect_types: aspect_types, paths: paths do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_entry ::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_entry(::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_entry_client_stub.call_rpc_count + end + end + + def test_lookup_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTRY_VIEW_UNSPECIFIED + aspect_types = ["hello world"] + paths = ["hello world"] + entry = "hello world" + + lookup_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lookup_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::LookupEntryRequest, request + assert_equal "hello world", request["name"] + assert_equal :ENTRY_VIEW_UNSPECIFIED, request["view"] + assert_equal ["hello world"], request["aspect_types"] + assert_equal ["hello world"], request["paths"] + assert_equal "hello world", request["entry"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, lookup_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.lookup_entry name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.lookup_entry ::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.lookup_entry(::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, lookup_entry_client_stub.call_rpc_count + end + end + + def test_search_entries + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + scope = "hello world" + + search_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_entries, name + assert_kind_of ::Google::Cloud::Dataplex::V1::SearchEntriesRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["query"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["scope"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_entries_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_entries_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb new file mode 100644 index 000000000000..c2ea8c62284f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/content_service" + +class ::Google::Cloud::Dataplex::V1::ContentService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_content_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.content_path project: "value0", location: "value1", lake: "value2", content: "value3" + assert_equal "projects/value0/locations/value1/lakes/value2/content/value3", path + end + end + + def test_lake_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lake_path project: "value0", location: "value1", lake: "value2" + assert_equal "projects/value0/locations/value1/lakes/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb new file mode 100644 index 000000000000..a0e45dc95ec6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb @@ -0,0 +1,535 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/dataplex/v1/content_pb" +require "google/cloud/dataplex/v1/content_service/rest" + + +class ::Google::Cloud::Dataplex::V1::ContentService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_content + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Content.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + content = {} + validate_only = true + + create_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_create_content_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_content({ parent: parent, content: content, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_content parent: parent, content: content, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_content ::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_content({ parent: parent, content: content, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_content(::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_content_client_stub.call_count + end + end + end + + def test_update_content + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Content.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + content = {} + validate_only = true + + update_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_update_content_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_content update_mask: update_mask, content: content, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_content ::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_content(::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_content_client_stub.call_count + end + end + end + + def test_delete_content + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_delete_content_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_content({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_content name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_content ::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_content({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_content(::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_content_client_stub.call_count + end + end + end + + def test_get_content + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Content.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :CONTENT_VIEW_UNSPECIFIED + + get_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_get_content_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_content({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_content name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_content ::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_content({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_content(::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_content_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_list_content + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListContentResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_list_content_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_content parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_content ::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_content(::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_content_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb new file mode 100644 index 000000000000..4d1b449973dd --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb @@ -0,0 +1,569 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/content_pb" +require "google/cloud/dataplex/v1/content_services_pb" +require "google/cloud/dataplex/v1/content_service" + +class ::Google::Cloud::Dataplex::V1::ContentService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_content + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Content.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + content = {} + validate_only = true + + create_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_content, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateContentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Content), request["content"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_content({ parent: parent, content: content, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_content parent: parent, content: content, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_content ::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_content({ parent: parent, content: content, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_content(::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_content_client_stub.call_rpc_count + end + end + + def test_update_content + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Content.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + content = {} + validate_only = true + + update_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_content, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateContentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Content), request["content"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_content update_mask: update_mask, content: content, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_content ::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_content(::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_content_client_stub.call_rpc_count + end + end + + def test_delete_content + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_content, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteContentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_content({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_content name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_content ::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_content({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_content(::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_content_client_stub.call_rpc_count + end + end + + def test_get_content + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Content.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :CONTENT_VIEW_UNSPECIFIED + + get_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_content, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetContentRequest, request + assert_equal "hello world", request["name"] + assert_equal :CONTENT_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_content({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_content name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_content ::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_content({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_content(::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_content_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_list_content + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListContentResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_content, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListContentRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_content_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_content parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_content ::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_content(::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_content_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb new file mode 100644 index 000000000000..fe360935dd72 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb @@ -0,0 +1,389 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/datascans_pb" +require "google/cloud/dataplex/v1/datascans_services_pb" +require "google/cloud/dataplex/v1/data_scan_service" + +class ::Google::Cloud::Dataplex::V1::DataScanService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb new file mode 100644 index 000000000000..38f511b8ed94 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/data_scan_service" + +class ::Google::Cloud::Dataplex::V1::DataScanService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_data_scan_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_scan_path project: "value0", location: "value1", dataScan: "value2" + assert_equal "projects/value0/locations/value1/dataScans/value2", path + end + end + + def test_data_scan_job_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_scan_job_path project: "value0", location: "value1", dataScan: "value2", job: "value3" + assert_equal "projects/value0/locations/value1/dataScans/value2/jobs/value3", path + end + end + + def test_entity_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entity_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb new file mode 100644 index 000000000000..d11b709f1ce5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb @@ -0,0 +1,591 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/dataplex/v1/datascans_pb" +require "google/cloud/dataplex/v1/data_scan_service/rest" + + +class ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_data_scan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_scan = {} + data_scan_id = "hello world" + validate_only = true + + create_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_create_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_scan parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_scan ::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_scan(::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_scan_client_stub.call_count + end + end + end + + def test_update_data_scan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_scan = {} + update_mask = {} + validate_only = true + + update_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_update_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_scan data_scan: data_scan, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_scan ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_scan(::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_scan_client_stub.call_count + end + end + end + + def test_delete_data_scan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_delete_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_scan({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_scan name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_scan ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_scan({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_scan(::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_scan_client_stub.call_count + end + end + end + + def test_get_data_scan + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataScan.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DATA_SCAN_VIEW_UNSPECIFIED + + get_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_get_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_scan({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_scan name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_scan ::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_scan({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_scan(::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_scan_client_stub.call_count + end + end + end + + def test_list_data_scans + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_scans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_list_data_scans_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_scans_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_scans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_scans ::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_scans(::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_scans_client_stub.call_count + end + end + end + + def test_run_data_scan + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + run_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_run_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_data_scan({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_data_scan name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_data_scan ::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_data_scan({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_data_scan(::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_data_scan_client_stub.call_count + end + end + end + + def test_get_data_scan_job + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataScanJob.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DATA_SCAN_JOB_VIEW_UNSPECIFIED + + get_data_scan_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_get_data_scan_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_scan_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_scan_job({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_scan_job name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_scan_job ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_scan_job({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_scan_job(::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_scan_job_client_stub.call_count + end + end + end + + def test_list_data_scan_jobs + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_data_scan_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_list_data_scan_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_scan_jobs_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_scan_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_scan_jobs ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_scan_jobs(::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_scan_jobs_client_stub.call_count + end + end + end + + def test_generate_data_quality_rules + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + generate_data_quality_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_generate_data_quality_rules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_data_quality_rules_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_data_quality_rules({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_data_quality_rules name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_data_quality_rules ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_data_quality_rules({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_data_quality_rules(::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_data_quality_rules_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb new file mode 100644 index 000000000000..392ea73c89c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb @@ -0,0 +1,665 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/datascans_pb" +require "google/cloud/dataplex/v1/datascans_services_pb" +require "google/cloud/dataplex/v1/data_scan_service" + +class ::Google::Cloud::Dataplex::V1::DataScanService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_data_scan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_scan = {} + data_scan_id = "hello world" + validate_only = true + + create_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataScanRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataScan), request["data_scan"] + assert_equal "hello world", request["data_scan_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_scan parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_scan ::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_scan(::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_scan_client_stub.call_rpc_count + end + end + + def test_update_data_scan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + data_scan = {} + update_mask = {} + validate_only = true + + update_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataScan), request["data_scan"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_scan data_scan: data_scan, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_scan ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_scan(::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_scan_client_stub.call_rpc_count + end + end + + def test_delete_data_scan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_scan({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_scan name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_scan ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_scan({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_scan(::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_scan_client_stub.call_rpc_count + end + end + + def test_get_data_scan + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataScan.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DATA_SCAN_VIEW_UNSPECIFIED + + get_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataScanRequest, request + assert_equal "hello world", request["name"] + assert_equal :DATA_SCAN_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_scan({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_scan name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_scan ::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_scan({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_scan(::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_scan_client_stub.call_rpc_count + end + end + + def test_list_data_scans + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_scans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_scans, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataScansRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_scans_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_scans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_scans ::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_scans(::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_scans_client_stub.call_rpc_count + end + end + + def test_run_data_scan + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + run_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::RunDataScanRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_data_scan({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.run_data_scan name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.run_data_scan ::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.run_data_scan({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.run_data_scan(::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_data_scan_client_stub.call_rpc_count + end + end + + def test_get_data_scan_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataScanJob.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DATA_SCAN_JOB_VIEW_UNSPECIFIED + + get_data_scan_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_scan_job, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, request + assert_equal "hello world", request["name"] + assert_equal :DATA_SCAN_JOB_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_scan_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_scan_job({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_scan_job name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_scan_job ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_scan_job({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_scan_job(::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_scan_job_client_stub.call_rpc_count + end + end + + def test_list_data_scan_jobs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_data_scan_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_scan_jobs, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_scan_jobs_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_scan_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_scan_jobs ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_scan_jobs(::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_scan_jobs_client_stub.call_rpc_count + end + end + + def test_generate_data_quality_rules + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + generate_data_quality_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_data_quality_rules, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_data_quality_rules_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_data_quality_rules({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_data_quality_rules name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_data_quality_rules ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_data_quality_rules({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_data_quality_rules(::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_data_quality_rules_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb new file mode 100644 index 000000000000..7b371bd9a615 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb @@ -0,0 +1,389 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/data_taxonomy_pb" +require "google/cloud/dataplex/v1/data_taxonomy_services_pb" +require "google/cloud/dataplex/v1/data_taxonomy_service" + +class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb new file mode 100644 index 000000000000..c0e783bf9bf9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/data_taxonomy_service" + +class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_data_attribute_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_attribute_path project: "value0", location: "value1", dataTaxonomy: "value2", data_attribute_id: "value3" + assert_equal "projects/value0/locations/value1/dataTaxonomies/value2/attributes/value3", path + end + end + + def test_data_attribute_binding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_attribute_binding_path project: "value0", location: "value1", data_attribute_binding_id: "value2" + assert_equal "projects/value0/locations/value1/dataAttributeBindings/value2", path + end + end + + def test_data_taxonomy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_taxonomy_path project: "value0", location: "value1", data_taxonomy_id: "value2" + assert_equal "projects/value0/locations/value1/dataTaxonomies/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb new file mode 100644 index 000000000000..d010c1dfc5c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb @@ -0,0 +1,931 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/dataplex/v1/data_taxonomy_pb" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest" + + +class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_data_taxonomy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_taxonomy_id = "hello world" + data_taxonomy = {} + validate_only = true + + create_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_taxonomy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_taxonomy parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_taxonomy ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_taxonomy(::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_taxonomy_client_stub.call_count + end + end + end + + def test_update_data_taxonomy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_taxonomy = {} + validate_only = true + + update_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_taxonomy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_taxonomy update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_taxonomy ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_taxonomy(::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_taxonomy_client_stub.call_count + end + end + end + + def test_delete_data_taxonomy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_taxonomy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_taxonomy({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_taxonomy name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_taxonomy ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_taxonomy({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_taxonomy(::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_taxonomy_client_stub.call_count + end + end + end + + def test_list_data_taxonomies + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_taxonomies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_taxonomies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_taxonomies_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_taxonomies parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_taxonomies ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_taxonomies(::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_taxonomies_client_stub.call_count + end + end + end + + def test_get_data_taxonomy + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataTaxonomy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_taxonomy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_taxonomy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_taxonomy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_taxonomy ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_taxonomy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_taxonomy(::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_taxonomy_client_stub.call_count + end + end + end + + def test_create_data_attribute_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_attribute_binding_id = "hello world" + data_attribute_binding = {} + validate_only = true + + create_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_attribute_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_attribute_binding parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_attribute_binding ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_attribute_binding(::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_attribute_binding_client_stub.call_count + end + end + end + + def test_update_data_attribute_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_attribute_binding = {} + validate_only = true + + update_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_attribute_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_attribute_binding update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_attribute_binding ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_attribute_binding(::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_attribute_binding_client_stub.call_count + end + end + end + + def test_delete_data_attribute_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_attribute_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_attribute_binding({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_attribute_binding name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_attribute_binding ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_attribute_binding({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_attribute_binding(::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_attribute_binding_client_stub.call_count + end + end + end + + def test_list_data_attribute_bindings + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_attribute_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_attribute_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_attribute_bindings_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_attribute_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_attribute_bindings ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_attribute_bindings(::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_attribute_bindings_client_stub.call_count + end + end + end + + def test_get_data_attribute_binding + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_attribute_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_attribute_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_attribute_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_attribute_binding ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_attribute_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_attribute_binding(::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_attribute_binding_client_stub.call_count + end + end + end + + def test_create_data_attribute + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_attribute_id = "hello world" + data_attribute = {} + validate_only = true + + create_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_attribute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_attribute parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_attribute ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_attribute(::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_attribute_client_stub.call_count + end + end + end + + def test_update_data_attribute + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_attribute = {} + validate_only = true + + update_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_attribute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_attribute update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_attribute ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_attribute(::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_attribute_client_stub.call_count + end + end + end + + def test_delete_data_attribute + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_attribute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_attribute({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_attribute name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_attribute ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_attribute({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_attribute(::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_attribute_client_stub.call_count + end + end + end + + def test_list_data_attributes + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_attributes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_attributes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_attributes_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_attributes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_attributes ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_attributes(::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_attributes_client_stub.call_count + end + end + end + + def test_get_data_attribute + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataAttribute.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_attribute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_attribute({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_attribute name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_attribute ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_attribute({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_attribute(::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_attribute_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb new file mode 100644 index 000000000000..0a264bcd0072 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb @@ -0,0 +1,1080 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/data_taxonomy_pb" +require "google/cloud/dataplex/v1/data_taxonomy_services_pb" +require "google/cloud/dataplex/v1/data_taxonomy_service" + +class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_data_taxonomy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_taxonomy_id = "hello world" + data_taxonomy = {} + validate_only = true + + create_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_taxonomy, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_taxonomy_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataTaxonomy), request["data_taxonomy"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_taxonomy parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_taxonomy ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_taxonomy(::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_taxonomy_client_stub.call_rpc_count + end + end + + def test_update_data_taxonomy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_taxonomy = {} + validate_only = true + + update_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_taxonomy, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataTaxonomy), request["data_taxonomy"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_taxonomy update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_taxonomy ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_taxonomy(::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_taxonomy_client_stub.call_rpc_count + end + end + + def test_delete_data_taxonomy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_taxonomy, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_taxonomy({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_taxonomy name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_taxonomy ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_taxonomy({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_taxonomy(::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_taxonomy_client_stub.call_rpc_count + end + end + + def test_list_data_taxonomies + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_taxonomies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_taxonomies, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_taxonomies_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_taxonomies parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_taxonomies ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_taxonomies(::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_taxonomies_client_stub.call_rpc_count + end + end + + def test_get_data_taxonomy + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataTaxonomy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_taxonomy, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_taxonomy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_taxonomy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_taxonomy ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_taxonomy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_taxonomy(::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_taxonomy_client_stub.call_rpc_count + end + end + + def test_create_data_attribute_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_attribute_binding_id = "hello world" + data_attribute_binding = {} + validate_only = true + + create_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_attribute_binding, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_attribute_binding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttributeBinding), request["data_attribute_binding"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_attribute_binding parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_attribute_binding ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_attribute_binding(::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_attribute_binding_client_stub.call_rpc_count + end + end + + def test_update_data_attribute_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_attribute_binding = {} + validate_only = true + + update_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_attribute_binding, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttributeBinding), request["data_attribute_binding"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_attribute_binding update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_attribute_binding ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_attribute_binding(::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_attribute_binding_client_stub.call_rpc_count + end + end + + def test_delete_data_attribute_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_attribute_binding, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_attribute_binding({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_attribute_binding name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_attribute_binding ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_attribute_binding({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_attribute_binding(::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_attribute_binding_client_stub.call_rpc_count + end + end + + def test_list_data_attribute_bindings + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_attribute_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_attribute_bindings, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_attribute_bindings_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_attribute_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_attribute_bindings ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_attribute_bindings(::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_attribute_bindings_client_stub.call_rpc_count + end + end + + def test_get_data_attribute_binding + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_attribute_binding, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_attribute_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_attribute_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_attribute_binding ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_attribute_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_attribute_binding(::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_attribute_binding_client_stub.call_rpc_count + end + end + + def test_create_data_attribute + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_attribute_id = "hello world" + data_attribute = {} + validate_only = true + + create_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_attribute, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_attribute_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttribute), request["data_attribute"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_attribute parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_attribute ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_attribute(::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_attribute_client_stub.call_rpc_count + end + end + + def test_update_data_attribute + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_attribute = {} + validate_only = true + + update_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_attribute, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttribute), request["data_attribute"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_attribute update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_attribute ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_attribute(::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_attribute_client_stub.call_rpc_count + end + end + + def test_delete_data_attribute + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_attribute, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_attribute({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_attribute name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_attribute ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_attribute({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_attribute(::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_attribute_client_stub.call_rpc_count + end + end + + def test_list_data_attributes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_attributes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_attributes, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_attributes_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_attributes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_attributes ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_attributes(::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_attributes_client_stub.call_rpc_count + end + end + + def test_get_data_attribute + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataAttribute.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_attribute, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_attribute({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_attribute name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_attribute ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_attribute({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_attribute(::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_attribute_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb new file mode 100644 index 000000000000..99f73b424fa1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb @@ -0,0 +1,389 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/service_pb" +require "google/cloud/dataplex/v1/service_services_pb" +require "google/cloud/dataplex/v1/dataplex_service" + +class ::Google::Cloud::Dataplex::V1::DataplexService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb new file mode 100644 index 000000000000..24b850eb7d98 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb @@ -0,0 +1,119 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/dataplex_service" + +class ::Google::Cloud::Dataplex::V1::DataplexService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_asset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.asset_path project: "value0", location: "value1", lake: "value2", zone: "value3", asset: "value4" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/assets/value4", path + end + end + + def test_environment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.environment_path project: "value0", location: "value1", lake: "value2", environment: "value3" + assert_equal "projects/value0/locations/value1/lakes/value2/environments/value3", path + end + end + + def test_job_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.job_path project: "value0", location: "value1", lake: "value2", task: "value3", job: "value4" + assert_equal "projects/value0/locations/value1/lakes/value2/tasks/value3/jobs/value4", path + end + end + + def test_lake_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lake_path project: "value0", location: "value1", lake: "value2" + assert_equal "projects/value0/locations/value1/lakes/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_task_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.task_path project: "value0", location: "value1", lake: "value2", task: "value3" + assert_equal "projects/value0/locations/value1/lakes/value2/tasks/value3", path + end + end + + def test_zone_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.zone_path project: "value0", location: "value1", lake: "value2", zone: "value3" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb new file mode 100644 index 000000000000..c4dee6bbd6ed --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb @@ -0,0 +1,1931 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/dataplex/v1/service_pb" +require "google/cloud/dataplex/v1/dataplex_service/rest" + + +class ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_lake + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lake_id = "hello world" + lake = {} + validate_only = true + + create_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_lake_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_lake parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_lake ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_lake(::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_lake_client_stub.call_count + end + end + end + + def test_update_lake + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + lake = {} + validate_only = true + + update_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_lake_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_lake update_mask: update_mask, lake: lake, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_lake ::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_lake(::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_lake_client_stub.call_count + end + end + end + + def test_delete_lake + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_lake_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_lake({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_lake name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_lake ::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_lake({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_lake(::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_lake_client_stub.call_count + end + end + end + + def test_list_lakes + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListLakesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_lakes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_lakes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_lakes_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_lakes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_lakes ::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_lakes(::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_lakes_client_stub.call_count + end + end + end + + def test_get_lake + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Lake.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_lake_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_lake({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_lake name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_lake ::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_lake({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_lake(::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lake_client_stub.call_count + end + end + end + + def test_list_lake_actions + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_lake_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_lake_actions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_lake_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_lake_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_lake_actions ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_lake_actions(::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_lake_actions_client_stub.call_count + end + end + end + + def test_create_zone + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + zone_id = "hello world" + zone = {} + validate_only = true + + create_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_zone parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_zone ::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_zone(::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_zone_client_stub.call_count + end + end + end + + def test_update_zone + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + zone = {} + validate_only = true + + update_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_zone update_mask: update_mask, zone: zone, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_zone ::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_zone(::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_zone_client_stub.call_count + end + end + end + + def test_delete_zone + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_zone({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_zone name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_zone ::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_zone({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_zone(::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_zone_client_stub.call_count + end + end + end + + def test_list_zones + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListZonesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_zones_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_zones_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_zones_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_zones parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_zones ::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_zones(::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_zones_client_stub.call_count + end + end + end + + def test_get_zone + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Zone.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_zone({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_zone name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_zone ::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_zone({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_zone(::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_zone_client_stub.call_count + end + end + end + + def test_list_zone_actions + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_zone_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_zone_actions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_zone_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_zone_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_zone_actions ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_zone_actions(::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_zone_actions_client_stub.call_count + end + end + end + + def test_create_asset + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + asset_id = "hello world" + asset = {} + validate_only = true + + create_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_asset parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_asset ::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_asset(::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_asset_client_stub.call_count + end + end + end + + def test_update_asset + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + asset = {} + validate_only = true + + update_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_asset update_mask: update_mask, asset: asset, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_asset ::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_asset(::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_asset_client_stub.call_count + end + end + end + + def test_delete_asset + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_asset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_asset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_asset ::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_asset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_asset(::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_asset_client_stub.call_count + end + end + end + + def test_list_assets + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_assets ::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_assets(::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_count + end + end + end + + def test_get_asset + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Asset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_asset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_asset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_asset ::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_asset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_asset(::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_asset_client_stub.call_count + end + end + end + + def test_list_asset_actions + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_asset_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_asset_actions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_asset_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_asset_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_asset_actions ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_asset_actions(::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_asset_actions_client_stub.call_count + end + end + end + + def test_create_task + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + task_id = "hello world" + task = {} + validate_only = true + + create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_task parent: parent, task_id: task_id, task: task, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_task ::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_task(::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_task_client_stub.call_count + end + end + end + + def test_update_task + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + task = {} + validate_only = true + + update_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_task update_mask: update_mask, task: task, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_task ::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_task(::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_task_client_stub.call_count + end + end + end + + def test_delete_task + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_task({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_task name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_task ::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_task({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_task(::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_task_client_stub.call_count + end + end + end + + def test_list_tasks + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListTasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_tasks parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_tasks ::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_tasks(::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_tasks_client_stub.call_count + end + end + end + + def test_get_task + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_task({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_task name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_task ::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_task({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_task(::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_count + end + end + end + + def test_list_jobs + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListJobsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_jobs_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_jobs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_jobs ::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_jobs(::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_jobs_client_stub.call_count + end + end + end + + def test_run_task + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::RunTaskResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + labels = {} + args = {} + + run_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_run_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_task({ name: name, labels: labels, args: args }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_task name: name, labels: labels, args: args do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_task ::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_task({ name: name, labels: labels, args: args }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_task(::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_task_client_stub.call_count + end + end + end + + def test_get_job + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Job.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_job ::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_job(::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_job_client_stub.call_count + end + end + end + + def test_cancel_job + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_cancel_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, cancel_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.cancel_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.cancel_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.cancel_job ::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.cancel_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.cancel_job(::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, cancel_job_client_stub.call_count + end + end + end + + def test_create_environment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + environment_id = "hello world" + environment = {} + validate_only = true + + create_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_environment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_environment parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_environment ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_environment(::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_environment_client_stub.call_count + end + end + end + + def test_update_environment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + environment = {} + validate_only = true + + update_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_environment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_environment update_mask: update_mask, environment: environment, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_environment ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_environment(::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_environment_client_stub.call_count + end + end + end + + def test_delete_environment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_environment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_environment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_environment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_environment ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_environment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_environment(::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_environment_client_stub.call_count + end + end + end + + def test_list_environments + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_environments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_environments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_environments_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_environments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_environments ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_environments(::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_environments_client_stub.call_count + end + end + end + + def test_get_environment + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Environment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_environment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_environment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_environment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_environment ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_environment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_environment(::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_environment_client_stub.call_count + end + end + end + + def test_list_sessions + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListSessionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_sessions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_sessions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sessions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_sessions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_sessions ::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_sessions(::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_sessions_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb new file mode 100644 index 000000000000..7c667d2e90a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb @@ -0,0 +1,2245 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/service_pb" +require "google/cloud/dataplex/v1/service_services_pb" +require "google/cloud/dataplex/v1/dataplex_service" + +class ::Google::Cloud::Dataplex::V1::DataplexService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_lake + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lake_id = "hello world" + lake = {} + validate_only = true + + create_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_lake, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateLakeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["lake_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Lake), request["lake"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_lake parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_lake ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_lake(::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_lake_client_stub.call_rpc_count + end + end + + def test_update_lake + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + lake = {} + validate_only = true + + update_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_lake, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateLakeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Lake), request["lake"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_lake update_mask: update_mask, lake: lake, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_lake ::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_lake(::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_lake_client_stub.call_rpc_count + end + end + + def test_delete_lake + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_lake, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteLakeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_lake({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_lake name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_lake ::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_lake({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_lake(::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_lake_client_stub.call_rpc_count + end + end + + def test_list_lakes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListLakesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_lakes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_lakes, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListLakesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_lakes_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_lakes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_lakes ::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_lakes(::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_lakes_client_stub.call_rpc_count + end + end + + def test_get_lake + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Lake.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lake, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetLakeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_lake({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_lake name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_lake ::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_lake({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_lake(::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_lake_client_stub.call_rpc_count + end + end + + def test_list_lake_actions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_lake_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_lake_actions, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_lake_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_lake_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_lake_actions ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_lake_actions(::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_lake_actions_client_stub.call_rpc_count + end + end + + def test_create_zone + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + zone_id = "hello world" + zone = {} + validate_only = true + + create_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_zone, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateZoneRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["zone_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Zone), request["zone"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_zone parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_zone ::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_zone(::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_zone_client_stub.call_rpc_count + end + end + + def test_update_zone + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + zone = {} + validate_only = true + + update_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_zone, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateZoneRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Zone), request["zone"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_zone update_mask: update_mask, zone: zone, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_zone ::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_zone(::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_zone_client_stub.call_rpc_count + end + end + + def test_delete_zone + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_zone, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteZoneRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_zone({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_zone name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_zone ::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_zone({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_zone(::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_zone_client_stub.call_rpc_count + end + end + + def test_list_zones + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListZonesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_zones_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_zones, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListZonesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_zones_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_zones parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_zones ::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_zones(::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_zones_client_stub.call_rpc_count + end + end + + def test_get_zone + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Zone.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_zone, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetZoneRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_zone({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_zone name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_zone ::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_zone({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_zone(::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_zone_client_stub.call_rpc_count + end + end + + def test_list_zone_actions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_zone_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_zone_actions, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_zone_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_zone_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_zone_actions ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_zone_actions(::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_zone_actions_client_stub.call_rpc_count + end + end + + def test_create_asset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + asset_id = "hello world" + asset = {} + validate_only = true + + create_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateAssetRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["asset_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Asset), request["asset"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_asset parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_asset ::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_asset(::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_asset_client_stub.call_rpc_count + end + end + + def test_update_asset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + asset = {} + validate_only = true + + update_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateAssetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Asset), request["asset"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_asset update_mask: update_mask, asset: asset, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_asset ::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_asset(::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_asset_client_stub.call_rpc_count + end + end + + def test_delete_asset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteAssetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_asset({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_asset name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_asset ::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_asset({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_asset(::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_asset_client_stub.call_rpc_count + end + end + + def test_list_assets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_assets, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListAssetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_assets_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_assets ::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_assets(::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_rpc_count + end + end + + def test_get_asset + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Asset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetAssetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_asset({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_asset name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_asset ::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_asset({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_asset(::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_asset_client_stub.call_rpc_count + end + end + + def test_list_asset_actions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_asset_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_asset_actions, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_asset_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_asset_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_asset_actions ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_asset_actions(::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_asset_actions_client_stub.call_rpc_count + end + end + + def test_create_task + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + task_id = "hello world" + task = {} + validate_only = true + + create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateTaskRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["task_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Task), request["task"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_task parent: parent, task_id: task_id, task: task, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_task ::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_task(::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_task_client_stub.call_rpc_count + end + end + + def test_update_task + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + task = {} + validate_only = true + + update_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateTaskRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Task), request["task"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_task update_mask: update_mask, task: task, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_task ::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_task(::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_task_client_stub.call_rpc_count + end + end + + def test_delete_task + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteTaskRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_task({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_task name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_task ::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_task({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_task(::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_task_client_stub.call_rpc_count + end + end + + def test_list_tasks + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListTasksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tasks, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListTasksRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_tasks parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_tasks ::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_tasks(::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_tasks_client_stub.call_rpc_count + end + end + + def test_get_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetTaskRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_task({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_task name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_task ::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_task({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_task(::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_rpc_count + end + end + + def test_list_jobs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListJobsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_jobs, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListJobsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_jobs_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_jobs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_jobs ::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_jobs(::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_jobs_client_stub.call_rpc_count + end + end + + def test_run_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::RunTaskResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + labels = {} + args = {} + + run_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::RunTaskRequest, request + assert_equal "hello world", request["name"] + assert_equal({}, request["labels"].to_h) + assert_equal({}, request["args"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_task({ name: name, labels: labels, args: args }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.run_task name: name, labels: labels, args: args do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.run_task ::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.run_task({ name: name, labels: labels, args: args }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.run_task(::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_task_client_stub.call_rpc_count + end + end + + def test_get_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Job.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_job, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_job ::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_job(::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_job_client_stub.call_rpc_count + end + end + + def test_cancel_job + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_job, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CancelJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_job ::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_job(::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_job_client_stub.call_rpc_count + end + end + + def test_create_environment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + environment_id = "hello world" + environment = {} + validate_only = true + + create_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_environment, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["environment_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Environment), request["environment"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_environment parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_environment ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_environment(::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_environment_client_stub.call_rpc_count + end + end + + def test_update_environment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + environment = {} + validate_only = true + + update_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_environment, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Environment), request["environment"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_environment update_mask: update_mask, environment: environment, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_environment ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_environment(::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_environment_client_stub.call_rpc_count + end + end + + def test_delete_environment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_environment, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_environment({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_environment name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_environment ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_environment({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_environment(::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_environment_client_stub.call_rpc_count + end + end + + def test_list_environments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_environments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_environments, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_environments_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_environments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_environments ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_environments(::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_environments_client_stub.call_rpc_count + end + end + + def test_get_environment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Environment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_environment, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_environment_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_environment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_environment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_environment ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_environment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_environment(::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_environment_client_stub.call_rpc_count + end + end + + def test_list_sessions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListSessionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_sessions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sessions, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListSessionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sessions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_sessions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_sessions ::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_sessions(::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_sessions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb new file mode 100644 index 000000000000..6d103094c6ef --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/metadata_service" + +class ::Google::Cloud::Dataplex::V1::MetadataService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_entity_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entity_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4", path + end + end + + def test_partition_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.partition_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4", partition: "value5" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4/partitions/value5", path + end + end + + def test_zone_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.zone_path project: "value0", location: "value1", lake: "value2", zone: "value3" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb new file mode 100644 index 000000000000..f39b65a77194 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb @@ -0,0 +1,592 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/dataplex/v1/metadata_pb" +require "google/cloud/dataplex/v1/metadata_service/rest" + + +class ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_entity + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entity = {} + validate_only = true + + create_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_create_entity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_entity parent: parent, entity: entity, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_entity ::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_entity(::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_entity_client_stub.call_count + end + end + end + + def test_update_entity + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + entity = {} + validate_only = true + + update_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_update_entity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_entity({ entity: entity, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_entity entity: entity, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_entity ::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_entity({ entity: entity, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_entity(::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_entity_client_stub.call_count + end + end + end + + def test_delete_entity + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_delete_entity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_entity({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_entity name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_entity ::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_entity({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_entity(::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_entity_client_stub.call_count + end + end + end + + def test_get_entity + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTITY_VIEW_UNSPECIFIED + + get_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_get_entity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_entity({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_entity name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_entity ::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_entity({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_entity(::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_entity_client_stub.call_count + end + end + end + + def test_list_entities + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + view = :ENTITY_VIEW_UNSPECIFIED + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_entities_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_list_entities_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_entities_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_entities parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_entities ::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_entities(::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_entities_client_stub.call_count + end + end + end + + def test_create_partition + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Partition.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + partition = {} + validate_only = true + + create_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_create_partition_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_partition parent: parent, partition: partition, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_partition ::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_partition(::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_partition_client_stub.call_count + end + end + end + + def test_delete_partition + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_delete_partition_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_partition({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_partition name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_partition ::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_partition({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_partition(::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_partition_client_stub.call_count + end + end + end + + def test_get_partition + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Partition.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_get_partition_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_partition({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_partition name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_partition ::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_partition({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_partition(::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_partition_client_stub.call_count + end + end + end + + def test_list_partitions + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_partitions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_list_partitions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_partitions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_partitions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_partitions ::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_partitions(::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_partitions_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb new file mode 100644 index 000000000000..7a3016ddfe7f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb @@ -0,0 +1,638 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataplex/v1/metadata_pb" +require "google/cloud/dataplex/v1/metadata_services_pb" +require "google/cloud/dataplex/v1/metadata_service" + +class ::Google::Cloud::Dataplex::V1::MetadataService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_entity + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entity = {} + validate_only = true + + create_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_entity, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntityRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entity), request["entity"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_entity parent: parent, entity: entity, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_entity ::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_entity(::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_entity_client_stub.call_rpc_count + end + end + + def test_update_entity + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + entity = {} + validate_only = true + + update_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_entity, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntityRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entity), request["entity"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_entity({ entity: entity, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_entity entity: entity, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_entity ::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_entity({ entity: entity, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_entity(::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_entity_client_stub.call_rpc_count + end + end + + def test_delete_entity + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_entity, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntityRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_entity({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_entity name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_entity ::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_entity({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_entity(::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_entity_client_stub.call_rpc_count + end + end + + def test_get_entity + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTITY_VIEW_UNSPECIFIED + + get_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_entity, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntityRequest, request + assert_equal "hello world", request["name"] + assert_equal :ENTITY_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_entity({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_entity name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_entity ::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_entity({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_entity(::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_entity_client_stub.call_rpc_count + end + end + + def test_list_entities + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + view = :ENTITY_VIEW_UNSPECIFIED + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_entities_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_entities, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntitiesRequest, request + assert_equal "hello world", request["parent"] + assert_equal :ENTITY_VIEW_UNSPECIFIED, request["view"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_entities_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_entities parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_entities ::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_entities(::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_entities_client_stub.call_rpc_count + end + end + + def test_create_partition + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Partition.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + partition = {} + validate_only = true + + create_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_partition, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreatePartitionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Partition), request["partition"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_partition parent: parent, partition: partition, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_partition ::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_partition(::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_partition_client_stub.call_rpc_count + end + end + + def test_delete_partition + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_partition, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeletePartitionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_partition({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_partition name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_partition ::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_partition({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_partition(::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_partition_client_stub.call_rpc_count + end + end + + def test_get_partition + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Partition.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_partition, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetPartitionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_partition({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_partition name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_partition ::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_partition({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_partition(::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_partition_client_stub.call_rpc_count + end + end + + def test_list_partitions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_partitions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_partitions, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListPartitionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_partitions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_partitions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_partitions ::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_partitions(::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_partitions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::MetadataService::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" From e1e2453fd4132c04eab8a18a33d5dce34a7d481d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 8 May 2024 00:06:02 +0000 Subject: [PATCH 4/4] =?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/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-dataplex-v1/.rubocop.yml | 33 - .../google-cloud-dataplex-v1/.toys.rb | 28 - .../google-cloud-dataplex-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-dataplex-v1/CHANGELOG.md | 2 - .../google-cloud-dataplex-v1/Gemfile | 11 - .../google-cloud-dataplex-v1/LICENSE.md | 201 - .../google-cloud-dataplex-v1/README.md | 144 - .../google-cloud-dataplex-v1/Rakefile | 169 - .../gapic_metadata.json | 543 --- .../google-cloud-dataplex-v1.gemspec | 30 - .../lib/google-cloud-dataplex-v1.rb | 21 - .../lib/google/cloud/dataplex/v1.rb | 50 - .../google/cloud/dataplex/v1/analyze_pb.rb | 62 - .../cloud/dataplex/v1/bindings_override.rb | 423 -- .../google/cloud/dataplex/v1/catalog_pb.rb | 101 - .../cloud/dataplex/v1/catalog_service.rb | 60 - .../dataplex/v1/catalog_service/client.rb | 2797 ------------ .../v1/catalog_service/credentials.rb | 47 - .../dataplex/v1/catalog_service/operations.rb | 801 ---- .../dataplex/v1/catalog_service/paths.rb | 128 - .../cloud/dataplex/v1/catalog_service/rest.rb | 58 - .../v1/catalog_service/rest/client.rb | 2622 ----------- .../v1/catalog_service/rest/operations.rb | 895 ---- .../v1/catalog_service/rest/service_stub.rb | 1375 ------ .../cloud/dataplex/v1/catalog_services_pb.rb | 91 - .../google/cloud/dataplex/v1/content_pb.rb | 60 - .../cloud/dataplex/v1/content_service.rb | 55 - .../dataplex/v1/content_service/client.rb | 1204 ----- .../v1/content_service/credentials.rb | 47 - .../dataplex/v1/content_service/paths.rb | 73 - .../cloud/dataplex/v1/content_service/rest.rb | 53 - .../v1/content_service/rest/client.rb | 1131 ----- .../v1/content_service/rest/service_stub.rb | 605 --- .../cloud/dataplex/v1/content_services_pb.rb | 77 - .../cloud/dataplex/v1/data_profile_pb.rb | 60 - .../cloud/dataplex/v1/data_quality_pb.rb | 73 - .../cloud/dataplex/v1/data_scan_service.rb | 58 - .../dataplex/v1/data_scan_service/client.rb | 1329 ------ .../v1/data_scan_service/credentials.rb | 47 - .../v1/data_scan_service/operations.rb | 801 ---- .../dataplex/v1/data_scan_service/paths.rb | 113 - .../dataplex/v1/data_scan_service/rest.rb | 56 - .../v1/data_scan_service/rest/client.rb | 1248 ------ .../v1/data_scan_service/rest/operations.rb | 895 ---- .../v1/data_scan_service/rest/service_stub.rb | 612 --- .../cloud/dataplex/v1/data_taxonomy_pb.rb | 77 - .../dataplex/v1/data_taxonomy_service.rb | 57 - .../v1/data_taxonomy_service/client.rb | 1966 -------- .../v1/data_taxonomy_service/credentials.rb | 47 - .../v1/data_taxonomy_service/operations.rb | 801 ---- .../v1/data_taxonomy_service/paths.rb | 109 - .../dataplex/v1/data_taxonomy_service/rest.rb | 55 - .../v1/data_taxonomy_service/rest/client.rb | 1841 -------- .../data_taxonomy_service/rest/operations.rb | 895 ---- .../rest/service_stub.rb | 960 ---- .../dataplex/v1/data_taxonomy_services_pb.rb | 77 - .../cloud/dataplex/v1/dataplex_service.rb | 60 - .../dataplex/v1/dataplex_service/client.rb | 3950 ----------------- .../v1/dataplex_service/credentials.rb | 47 - .../v1/dataplex_service/operations.rb | 801 ---- .../dataplex/v1/dataplex_service/paths.rb | 178 - .../dataplex/v1/dataplex_service/rest.rb | 58 - .../v1/dataplex_service/rest/client.rb | 3700 --------------- .../v1/dataplex_service/rest/operations.rb | 895 ---- .../v1/dataplex_service/rest/service_stub.rb | 2028 --------- .../google/cloud/dataplex/v1/datascans_pb.rb | 81 - .../dataplex/v1/datascans_services_pb.rb | 63 - .../lib/google/cloud/dataplex/v1/logs_pb.rb | 84 - .../google/cloud/dataplex/v1/metadata_pb.rb | 82 - .../cloud/dataplex/v1/metadata_service.rb | 56 - .../dataplex/v1/metadata_service/client.rb | 1313 ------ .../v1/metadata_service/credentials.rb | 47 - .../dataplex/v1/metadata_service/paths.rb | 102 - .../dataplex/v1/metadata_service/rest.rb | 54 - .../v1/metadata_service/rest/client.rb | 1233 ----- .../v1/metadata_service/rest/service_stub.rb | 603 --- .../cloud/dataplex/v1/metadata_services_pb.rb | 62 - .../google/cloud/dataplex/v1/processing_pb.rb | 50 - .../google/cloud/dataplex/v1/resources_pb.rb | 87 - .../lib/google/cloud/dataplex/v1/rest.rb | 43 - .../google/cloud/dataplex/v1/security_pb.rb | 45 - .../google/cloud/dataplex/v1/service_pb.rb | 101 - .../cloud/dataplex/v1/service_services_pb.rb | 117 - .../lib/google/cloud/dataplex/v1/tasks_pb.rb | 64 - .../lib/google/cloud/dataplex/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 399 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 222 - .../google/cloud/dataplex/v1/analyze.rb | 290 -- .../google/cloud/dataplex/v1/catalog.rb | 1092 ----- .../google/cloud/dataplex/v1/content.rb | 142 - .../google/cloud/dataplex/v1/data_profile.rb | 321 -- .../google/cloud/dataplex/v1/data_quality.rb | 540 --- .../google/cloud/dataplex/v1/data_taxonomy.rb | 565 --- .../google/cloud/dataplex/v1/datascans.rb | 474 -- .../google/cloud/dataplex/v1/logs.rb | 814 ---- .../google/cloud/dataplex/v1/metadata.rb | 733 --- .../google/cloud/dataplex/v1/processing.rb | 106 - .../google/cloud/dataplex/v1/resources.rb | 838 ---- .../google/cloud/dataplex/v1/security.rb | 61 - .../google/cloud/dataplex/v1/service.rb | 803 ---- .../google/cloud/dataplex/v1/tasks.rb | 435 -- .../google/longrunning/operations.rb | 164 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/struct.rb | 96 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../google-cloud-dataplex-v1/snippets/Gemfile | 32 - .../catalog_service/create_aspect_type.rb | 54 - .../snippets/catalog_service/create_entry.rb | 47 - .../catalog_service/create_entry_group.rb | 54 - .../catalog_service/create_entry_type.rb | 54 - .../catalog_service/delete_aspect_type.rb | 54 - .../snippets/catalog_service/delete_entry.rb | 47 - .../catalog_service/delete_entry_group.rb | 54 - .../catalog_service/delete_entry_type.rb | 54 - .../catalog_service/get_aspect_type.rb | 47 - .../snippets/catalog_service/get_entry.rb | 47 - .../catalog_service/get_entry_group.rb | 47 - .../catalog_service/get_entry_type.rb | 47 - .../catalog_service/list_aspect_types.rb | 51 - .../snippets/catalog_service/list_entries.rb | 51 - .../catalog_service/list_entry_groups.rb | 51 - .../catalog_service/list_entry_types.rb | 51 - .../snippets/catalog_service/lookup_entry.rb | 47 - .../catalog_service/search_entries.rb | 51 - .../catalog_service/update_aspect_type.rb | 54 - .../snippets/catalog_service/update_entry.rb | 47 - .../catalog_service/update_entry_group.rb | 54 - .../catalog_service/update_entry_type.rb | 54 - .../content_service/create_content.rb | 47 - .../content_service/delete_content.rb | 47 - .../snippets/content_service/get_content.rb | 47 - .../content_service/get_iam_policy.rb | 47 - .../snippets/content_service/list_content.rb | 51 - .../content_service/set_iam_policy.rb | 47 - .../content_service/test_iam_permissions.rb | 47 - .../content_service/update_content.rb | 47 - .../data_scan_service/create_data_scan.rb | 54 - .../data_scan_service/delete_data_scan.rb | 54 - .../generate_data_quality_rules.rb | 47 - .../data_scan_service/get_data_scan.rb | 47 - .../data_scan_service/get_data_scan_job.rb | 47 - .../data_scan_service/list_data_scan_jobs.rb | 51 - .../data_scan_service/list_data_scans.rb | 51 - .../data_scan_service/run_data_scan.rb | 47 - .../data_scan_service/update_data_scan.rb | 54 - .../create_data_attribute.rb | 54 - .../create_data_attribute_binding.rb | 54 - .../create_data_taxonomy.rb | 54 - .../delete_data_attribute.rb | 54 - .../delete_data_attribute_binding.rb | 54 - .../delete_data_taxonomy.rb | 54 - .../get_data_attribute.rb | 47 - .../get_data_attribute_binding.rb | 47 - .../get_data_taxonomy.rb | 47 - .../list_data_attribute_bindings.rb | 51 - .../list_data_attributes.rb | 51 - .../list_data_taxonomies.rb | 51 - .../update_data_attribute.rb | 54 - .../update_data_attribute_binding.rb | 54 - .../update_data_taxonomy.rb | 54 - .../snippets/dataplex_service/cancel_job.rb | 47 - .../snippets/dataplex_service/create_asset.rb | 54 - .../dataplex_service/create_environment.rb | 54 - .../snippets/dataplex_service/create_lake.rb | 54 - .../snippets/dataplex_service/create_task.rb | 54 - .../snippets/dataplex_service/create_zone.rb | 54 - .../snippets/dataplex_service/delete_asset.rb | 54 - .../dataplex_service/delete_environment.rb | 54 - .../snippets/dataplex_service/delete_lake.rb | 54 - .../snippets/dataplex_service/delete_task.rb | 54 - .../snippets/dataplex_service/delete_zone.rb | 54 - .../snippets/dataplex_service/get_asset.rb | 47 - .../dataplex_service/get_environment.rb | 47 - .../snippets/dataplex_service/get_job.rb | 47 - .../snippets/dataplex_service/get_lake.rb | 47 - .../snippets/dataplex_service/get_task.rb | 47 - .../snippets/dataplex_service/get_zone.rb | 47 - .../dataplex_service/list_asset_actions.rb | 51 - .../snippets/dataplex_service/list_assets.rb | 51 - .../dataplex_service/list_environments.rb | 51 - .../snippets/dataplex_service/list_jobs.rb | 51 - .../dataplex_service/list_lake_actions.rb | 51 - .../snippets/dataplex_service/list_lakes.rb | 51 - .../dataplex_service/list_sessions.rb | 51 - .../snippets/dataplex_service/list_tasks.rb | 51 - .../dataplex_service/list_zone_actions.rb | 51 - .../snippets/dataplex_service/list_zones.rb | 51 - .../snippets/dataplex_service/run_task.rb | 47 - .../snippets/dataplex_service/update_asset.rb | 54 - .../dataplex_service/update_environment.rb | 54 - .../snippets/dataplex_service/update_lake.rb | 54 - .../snippets/dataplex_service/update_task.rb | 54 - .../snippets/dataplex_service/update_zone.rb | 54 - .../metadata_service/create_entity.rb | 47 - .../metadata_service/create_partition.rb | 47 - .../metadata_service/delete_entity.rb | 47 - .../metadata_service/delete_partition.rb | 47 - .../snippets/metadata_service/get_entity.rb | 47 - .../metadata_service/get_partition.rb | 47 - .../metadata_service/list_entities.rb | 51 - .../metadata_service/list_partitions.rb | 51 - .../metadata_service/update_entity.rb | 47 - ...pet_metadata_google.cloud.dataplex.v1.json | 3855 ---------------- .../v1/catalog_service_operations_test.rb | 389 -- .../dataplex/v1/catalog_service_paths_test.rb | 95 - .../dataplex/v1/catalog_service_rest_test.rb | 1330 ------ .../cloud/dataplex/v1/catalog_service_test.rb | 1538 ------- .../dataplex/v1/content_service_paths_test.rb | 59 - .../dataplex/v1/content_service_rest_test.rb | 535 --- .../cloud/dataplex/v1/content_service_test.rb | 569 --- .../v1/data_scan_service_operations_test.rb | 389 -- .../v1/data_scan_service_paths_test.rb | 83 - .../v1/data_scan_service_rest_test.rb | 591 --- .../dataplex/v1/data_scan_service_test.rb | 665 --- .../data_taxonomy_service_operations_test.rb | 389 -- .../v1/data_taxonomy_service_paths_test.rb | 83 - .../v1/data_taxonomy_service_rest_test.rb | 931 ---- .../dataplex/v1/data_taxonomy_service_test.rb | 1080 ----- .../v1/dataplex_service_operations_test.rb | 389 -- .../v1/dataplex_service_paths_test.rb | 119 - .../dataplex/v1/dataplex_service_rest_test.rb | 1931 -------- .../dataplex/v1/dataplex_service_test.rb | 2245 ---------- .../v1/metadata_service_paths_test.rb | 71 - .../dataplex/v1/metadata_service_rest_test.rb | 592 --- .../dataplex/v1/metadata_service_test.rb | 638 --- .../google-cloud-dataplex-v1/test/helper.rb | 25 - 237 files changed, 74869 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb 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 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json deleted file mode 100644 index 70ddbcadde04..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "dataplex.googleapis.com", - "api_shortname": "dataplex", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-dataplex-v1/latest", - "distribution_name": "google-cloud-dataplex-v1", - "is_cloud": true, - "language": "ruby", - "name": "dataplex", - "name_pretty": "Dataplex V1 API", - "product_documentation": "https://cloud.google.com/dataplex/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. Note that google-cloud-dataplex-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dataplex instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/dataplex/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml b/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml deleted file mode 100644 index 029e6a990334..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-dataplex-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-dataplex-v1.rb" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb b/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.yardopts b/owl-bot-staging/google-cloud-dataplex-v1/.yardopts deleted file mode 100644 index 610ce5201635..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Dataplex V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md deleted file mode 100644 index 1c60fe75f8a9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-dataplex-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-dataplex-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/dataplex/v1" - -client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/dataplex/v1" - -::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-dataplex-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/dataplex/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-dataplex-v1/Gemfile b/owl-bot-staging/google-cloud-dataplex-v1/Gemfile deleted file mode 100644 index 95163a6d11f8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.27.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md b/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/README.md b/owl-bot-staging/google-cloud-dataplex-v1/README.md deleted file mode 100644 index 9ad26827a2d7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/README.md +++ /dev/null @@ -1,144 +0,0 @@ -# Ruby Client for the Dataplex V1 API - -Dataplex API is used to manage the lifecycle of data lakes. - -Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Dataplex V1 API. Most users should consider using -the main client gem, -[google-cloud-dataplex](https://rubygems.org/gems/google-cloud-dataplex). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-dataplex-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/dataplex.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/dataplex/v1" - -client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new -request = ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new # (request fields as keyword arguments...) -response = client.create_lake request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-dataplex-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/dataplex/) -for general usage information. - -## Enabling Logging - -To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. -The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, -or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) -that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) -and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. - -Configuring a Ruby stdlib logger: - -```ruby -require "logger" - -module MyLogger - LOGGER = Logger.new $stderr, level: Logger::WARN - def logger - LOGGER - end -end - -# Define a gRPC module-level logger method before grpc/logconfig.rb loads. -module GRPC - extend MyLogger -end -``` - - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 2.7+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-dataplex`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-dataplex-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-dataplex`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-dataplex-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/Rakefile b/owl-bot-staging/google-cloud-dataplex-v1/Rakefile deleted file mode 100644 index 7de3c4e2f174..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-dataplex-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/dataplex/v1/dataplex_service/credentials" - ::Google::Cloud::Dataplex::V1::DataplexService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-dataplex-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-dataplex-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-dataplex-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-dataplex-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-dataplex-v1" - header "google-cloud-dataplex-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-dataplex-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-dataplex-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-dataplex-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-dataplex-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json deleted file mode 100644 index 99bf76d4e7ae..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json +++ /dev/null @@ -1,543 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.dataplex.v1", - "libraryPackage": "::Google::Cloud::Dataplex::V1", - "services": { - "DataplexService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::DataplexService::Client", - "rpcs": { - "CreateLake": { - "methods": [ - "create_lake" - ] - }, - "UpdateLake": { - "methods": [ - "update_lake" - ] - }, - "DeleteLake": { - "methods": [ - "delete_lake" - ] - }, - "ListLakes": { - "methods": [ - "list_lakes" - ] - }, - "GetLake": { - "methods": [ - "get_lake" - ] - }, - "ListLakeActions": { - "methods": [ - "list_lake_actions" - ] - }, - "CreateZone": { - "methods": [ - "create_zone" - ] - }, - "UpdateZone": { - "methods": [ - "update_zone" - ] - }, - "DeleteZone": { - "methods": [ - "delete_zone" - ] - }, - "ListZones": { - "methods": [ - "list_zones" - ] - }, - "GetZone": { - "methods": [ - "get_zone" - ] - }, - "ListZoneActions": { - "methods": [ - "list_zone_actions" - ] - }, - "CreateAsset": { - "methods": [ - "create_asset" - ] - }, - "UpdateAsset": { - "methods": [ - "update_asset" - ] - }, - "DeleteAsset": { - "methods": [ - "delete_asset" - ] - }, - "ListAssets": { - "methods": [ - "list_assets" - ] - }, - "GetAsset": { - "methods": [ - "get_asset" - ] - }, - "ListAssetActions": { - "methods": [ - "list_asset_actions" - ] - }, - "CreateTask": { - "methods": [ - "create_task" - ] - }, - "UpdateTask": { - "methods": [ - "update_task" - ] - }, - "DeleteTask": { - "methods": [ - "delete_task" - ] - }, - "ListTasks": { - "methods": [ - "list_tasks" - ] - }, - "GetTask": { - "methods": [ - "get_task" - ] - }, - "ListJobs": { - "methods": [ - "list_jobs" - ] - }, - "RunTask": { - "methods": [ - "run_task" - ] - }, - "GetJob": { - "methods": [ - "get_job" - ] - }, - "CancelJob": { - "methods": [ - "cancel_job" - ] - }, - "CreateEnvironment": { - "methods": [ - "create_environment" - ] - }, - "UpdateEnvironment": { - "methods": [ - "update_environment" - ] - }, - "DeleteEnvironment": { - "methods": [ - "delete_environment" - ] - }, - "ListEnvironments": { - "methods": [ - "list_environments" - ] - }, - "GetEnvironment": { - "methods": [ - "get_environment" - ] - }, - "ListSessions": { - "methods": [ - "list_sessions" - ] - } - } - } - } - }, - "CatalogService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::CatalogService::Client", - "rpcs": { - "CreateEntryType": { - "methods": [ - "create_entry_type" - ] - }, - "UpdateEntryType": { - "methods": [ - "update_entry_type" - ] - }, - "DeleteEntryType": { - "methods": [ - "delete_entry_type" - ] - }, - "ListEntryTypes": { - "methods": [ - "list_entry_types" - ] - }, - "GetEntryType": { - "methods": [ - "get_entry_type" - ] - }, - "CreateAspectType": { - "methods": [ - "create_aspect_type" - ] - }, - "UpdateAspectType": { - "methods": [ - "update_aspect_type" - ] - }, - "DeleteAspectType": { - "methods": [ - "delete_aspect_type" - ] - }, - "ListAspectTypes": { - "methods": [ - "list_aspect_types" - ] - }, - "GetAspectType": { - "methods": [ - "get_aspect_type" - ] - }, - "CreateEntryGroup": { - "methods": [ - "create_entry_group" - ] - }, - "UpdateEntryGroup": { - "methods": [ - "update_entry_group" - ] - }, - "DeleteEntryGroup": { - "methods": [ - "delete_entry_group" - ] - }, - "ListEntryGroups": { - "methods": [ - "list_entry_groups" - ] - }, - "GetEntryGroup": { - "methods": [ - "get_entry_group" - ] - }, - "CreateEntry": { - "methods": [ - "create_entry" - ] - }, - "UpdateEntry": { - "methods": [ - "update_entry" - ] - }, - "DeleteEntry": { - "methods": [ - "delete_entry" - ] - }, - "ListEntries": { - "methods": [ - "list_entries" - ] - }, - "GetEntry": { - "methods": [ - "get_entry" - ] - }, - "LookupEntry": { - "methods": [ - "lookup_entry" - ] - }, - "SearchEntries": { - "methods": [ - "search_entries" - ] - } - } - } - } - }, - "ContentService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::ContentService::Client", - "rpcs": { - "CreateContent": { - "methods": [ - "create_content" - ] - }, - "UpdateContent": { - "methods": [ - "update_content" - ] - }, - "DeleteContent": { - "methods": [ - "delete_content" - ] - }, - "GetContent": { - "methods": [ - "get_content" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "ListContent": { - "methods": [ - "list_content" - ] - } - } - } - } - }, - "DataTaxonomyService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client", - "rpcs": { - "CreateDataTaxonomy": { - "methods": [ - "create_data_taxonomy" - ] - }, - "UpdateDataTaxonomy": { - "methods": [ - "update_data_taxonomy" - ] - }, - "DeleteDataTaxonomy": { - "methods": [ - "delete_data_taxonomy" - ] - }, - "ListDataTaxonomies": { - "methods": [ - "list_data_taxonomies" - ] - }, - "GetDataTaxonomy": { - "methods": [ - "get_data_taxonomy" - ] - }, - "CreateDataAttributeBinding": { - "methods": [ - "create_data_attribute_binding" - ] - }, - "UpdateDataAttributeBinding": { - "methods": [ - "update_data_attribute_binding" - ] - }, - "DeleteDataAttributeBinding": { - "methods": [ - "delete_data_attribute_binding" - ] - }, - "ListDataAttributeBindings": { - "methods": [ - "list_data_attribute_bindings" - ] - }, - "GetDataAttributeBinding": { - "methods": [ - "get_data_attribute_binding" - ] - }, - "CreateDataAttribute": { - "methods": [ - "create_data_attribute" - ] - }, - "UpdateDataAttribute": { - "methods": [ - "update_data_attribute" - ] - }, - "DeleteDataAttribute": { - "methods": [ - "delete_data_attribute" - ] - }, - "ListDataAttributes": { - "methods": [ - "list_data_attributes" - ] - }, - "GetDataAttribute": { - "methods": [ - "get_data_attribute" - ] - } - } - } - } - }, - "DataScanService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::DataScanService::Client", - "rpcs": { - "CreateDataScan": { - "methods": [ - "create_data_scan" - ] - }, - "UpdateDataScan": { - "methods": [ - "update_data_scan" - ] - }, - "DeleteDataScan": { - "methods": [ - "delete_data_scan" - ] - }, - "GetDataScan": { - "methods": [ - "get_data_scan" - ] - }, - "ListDataScans": { - "methods": [ - "list_data_scans" - ] - }, - "RunDataScan": { - "methods": [ - "run_data_scan" - ] - }, - "GetDataScanJob": { - "methods": [ - "get_data_scan_job" - ] - }, - "ListDataScanJobs": { - "methods": [ - "list_data_scan_jobs" - ] - }, - "GenerateDataQualityRules": { - "methods": [ - "generate_data_quality_rules" - ] - } - } - } - } - }, - "MetadataService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::MetadataService::Client", - "rpcs": { - "CreateEntity": { - "methods": [ - "create_entity" - ] - }, - "UpdateEntity": { - "methods": [ - "update_entity" - ] - }, - "DeleteEntity": { - "methods": [ - "delete_entity" - ] - }, - "GetEntity": { - "methods": [ - "get_entity" - ] - }, - "ListEntities": { - "methods": [ - "list_entities" - ] - }, - "CreatePartition": { - "methods": [ - "create_partition" - ] - }, - "DeletePartition": { - "methods": [ - "delete_partition" - ] - }, - "GetPartition": { - "methods": [ - "get_partition" - ] - }, - "ListPartitions": { - "methods": [ - "list_partitions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec b/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec deleted file mode 100644 index fa222f4abb34..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/dataplex/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-dataplex-v1" - gem.version = Google::Cloud::Dataplex::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. Note that google-cloud-dataplex-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dataplex instead. See the readme for more details." - gem.summary = "Dataplex API is used to manage the lifecycle of data lakes." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.7" - - gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", ">= 0.7", "< 2.a" - gem.add_dependency "google-iam-v1", ">= 0.7", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb deleted file mode 100644 index 6a853eb65247..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/dataplex/v1" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb deleted file mode 100644 index a3347b7c69df..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/dataplex_service" -require "google/cloud/dataplex/v1/catalog_service" -require "google/cloud/dataplex/v1/content_service" -require "google/cloud/dataplex/v1/data_taxonomy_service" -require "google/cloud/dataplex/v1/data_scan_service" -require "google/cloud/dataplex/v1/metadata_service" -require "google/cloud/dataplex/v1/version" - -module Google - module Cloud - module Dataplex - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/dataplex/v1" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/dataplex/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb deleted file mode 100644 index 86e65c604fd7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/analyze.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/resources_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/dataplex/v1/analyze.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\r\n\x0b\x45nvironment\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#dataplex.googleapis.com/Environment\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x06 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.Environment.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12Z\n\x13infrastructure_spec\x18\x64 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Environment.InfrastructureSpecB\x03\xe0\x41\x02\x12L\n\x0csession_spec\x18\x65 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Environment.SessionSpecB\x03\xe0\x41\x01\x12P\n\x0esession_status\x18\x66 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.Environment.SessionStatusB\x03\xe0\x41\x03\x12H\n\tendpoints\x18\xc8\x01 \x01(\x0b\x32/.google.cloud.dataplex.v1.Environment.EndpointsB\x03\xe0\x41\x03\x1a\xe5\x04\n\x12InfrastructureSpec\x12\x61\n\x07\x63ompute\x18\x32 \x01(\x0b\x32I.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResourcesB\x03\xe0\x41\x01H\x00\x12`\n\x08os_image\x18\x64 \x01(\x0b\x32G.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntimeB\x03\xe0\x41\x02H\x01\x1a\x63\n\x10\x43omputeResources\x12\x19\n\x0c\x64isk_size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\nnode_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1b\n\x0emax_node_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x1a\x8c\x02\n\x0eOsImageRuntime\x12\x1a\n\rimage_version\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0ejava_libraries\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fpython_packages\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12p\n\nproperties\x18\x04 \x03(\x0b\x32W.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.PropertiesEntryB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0b\n\tresourcesB\t\n\x07runtime\x1aj\n\x0bSessionSpec\x12\x39\n\x11max_idle_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12 \n\x13\x65nable_fast_startup\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a$\n\rSessionStatus\x12\x13\n\x06\x61\x63tive\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x35\n\tEndpoints\x12\x16\n\tnotebooks\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03sql\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:y\xea\x41v\n#dataplex.googleapis.com/Environment\x12Oprojects/{project}/locations/{location}/lakes/{lake}/environments/{environment}\"\xa6\x07\n\x07\x43ontent\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Content\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06labels\x18\x06 \x03(\x0b\x32-.google.cloud.dataplex.v1.Content.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\tdata_text\x18\t \x01(\tB\x03\xe0\x41\x02H\x00\x12\x41\n\nsql_script\x18\x64 \x01(\x0b\x32+.google.cloud.dataplex.v1.Content.SqlScriptH\x01\x12>\n\x08notebook\x18\x65 \x01(\x0b\x32*.google.cloud.dataplex.v1.Content.NotebookH\x01\x1a\x91\x01\n\tSqlScript\x12L\n\x06\x65ngine\x18\x01 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.Content.SqlScript.QueryEngineB\x03\xe0\x41\x02\"6\n\x0bQueryEngine\x12\x1c\n\x18QUERY_ENGINE_UNSPECIFIED\x10\x00\x12\t\n\x05SPARK\x10\x02\x1a\x93\x01\n\x08Notebook\x12O\n\x0bkernel_type\x18\x01 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.Content.Notebook.KernelTypeB\x03\xe0\x41\x02\"6\n\nKernelType\x12\x1b\n\x17KERNEL_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PYTHON3\x10\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:l\xea\x41i\n\x1f\x64\x61taplex.googleapis.com/Content\x12\x46projects/{project}/locations/{location}/lakes/{lake}/content/{content}B\x06\n\x04\x64\x61taB\t\n\x07\x63ontent\"\xcd\x02\n\x07Session\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Session\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\x05state\x18\x04 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03:\x89\x01\xea\x41\x85\x01\n\x1f\x64\x61taplex.googleapis.com/Session\x12\x62projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}Bh\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x41nalyzeProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment").msgclass - Environment::InfrastructureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec").msgclass - Environment::InfrastructureSpec::ComputeResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources").msgclass - Environment::InfrastructureSpec::OsImageRuntime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime").msgclass - Environment::SessionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.SessionSpec").msgclass - Environment::SessionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.SessionStatus").msgclass - Environment::Endpoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.Endpoints").msgclass - Content = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content").msgclass - Content::SqlScript = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.SqlScript").msgclass - Content::SqlScript::QueryEngine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.SqlScript.QueryEngine").enummodule - Content::Notebook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.Notebook").msgclass - Content::Notebook::KernelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.Notebook.KernelType").enummodule - Session = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Session").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb deleted file mode 100644 index 2760d6770459..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb +++ /dev/null @@ -1,423 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/config" - -module Google - module Cloud - module Dataplex - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/dataplex/v1/rest" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = Configuration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - - ## - # @private - # Configuration class for the google.cloud.dataplex.v1 package. - # - # This class contains common configuration for all services - # of the google.cloud.dataplex.v1 package. - # - # This configuration is for internal use of the client library classes, - # and it is not intended that the end-users will read or change it. - # - class Configuration - extend ::Gapic::Config - - # @private - # Overrides for http bindings for the RPC of the mixins for this package. - # Services in this package should use these when creating clients for the mixin services. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb deleted file mode 100644 index a3ce27a01b7e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb +++ /dev/null @@ -1,101 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/catalog.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/service_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/dataplex/v1/catalog.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd3\r\n\nAspectType\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.AspectType.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12N\n\rauthorization\x18\x34 \x01(\x0b\x32\x32.google.cloud.dataplex.v1.AspectType.AuthorizationB\x03\xe0\x41\x05\x12U\n\x11metadata_template\x18\x35 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x02\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a\xa4\x07\n\x10MetadataTemplate\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12Q\n\rrecord_fields\x18\x06 \x03(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12Y\n\x0b\x65num_values\x18\x08 \x03(\x0b\x32?.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValueB\x03\xe0\x41\x01\x12M\n\tmap_items\x18\n \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12O\n\x0b\x61rray_items\x18\x0b \x01(\x0b\x32\x35.google.cloud.dataplex.v1.AspectType.MetadataTemplateB\x03\xe0\x41\x01\x12\x14\n\x07type_id\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08type_ref\x18\r \x01(\tB\x03\xe0\x41\x01\x12[\n\x0b\x63onstraints\x18\x32 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.ConstraintsB\x03\xe0\x41\x01\x12[\n\x0b\x61nnotations\x18\x33 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.AspectType.MetadataTemplate.AnnotationsB\x03\xe0\x41\x01\x1aK\n\tEnumValue\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ndeprecated\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0b\x43onstraints\x12\x15\n\x08required\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xad\x01\n\x0b\x41nnotations\x12\x17\n\ndeprecated\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdisplay_order\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bstring_type\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rstring_values\x18\x07 \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/AspectType\x12\x41projects/{project}/locations/{location}/aspectTypes/{aspect_type}*\x0b\x61spectTypes2\naspectType\"\xcd\x04\n\nEntryGroup\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x07 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.EntryGroup.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12G\n\x0ftransfer_status\x18\xca\x01 \x01(\x0e\x32(.google.cloud.dataplex.v1.TransferStatusB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x84\x01\xea\x41\x80\x01\n\"dataplex.googleapis.com/EntryGroup\x12\x41projects/{project}/locations/{location}/entryGroups/{entry_group}*\x0b\x65ntryGroups2\nentryGroup\"\xdc\x06\n\tEntryType\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x06labels\x18\x07 \x03(\x0b\x32/.google.cloud.dataplex.v1.EntryType.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0ctype_aliases\x18\t \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08platform\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06system\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12H\n\x10required_aspects\x18\x32 \x03(\x0b\x32..google.cloud.dataplex.v1.EntryType.AspectInfo\x12M\n\rauthorization\x18\x33 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.EntryType.AuthorizationB\x03\xe0\x41\x05\x1a\x43\n\nAspectInfo\x12\x35\n\x04type\x18\x01 \x01(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x1a\x36\n\rAuthorization\x12%\n\x18\x61lternate_use_permission\x18\x01 \x01(\tB\x03\xe0\x41\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:~\xea\x41{\n!dataplex.googleapis.com/EntryType\x12?projects/{project}/locations/{location}/entryTypes/{entry_type}*\nentryTypes2\tentryType\"\x91\x02\n\x06\x41spect\x12\x18\n\x0b\x61spect_type\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12*\n\x04\x64\x61ta\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\x12\x42\n\raspect_source\x18\t \x01(\x0b\x32&.google.cloud.dataplex.v1.AspectSourceB\x03\xe0\x41\x01\"p\n\x0c\x41spectSource\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc4\x04\n\x05\x45ntry\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\nentry_type\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07\x61spects\x18\t \x03(\x0b\x32,.google.cloud.dataplex.v1.Entry.AspectsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0cparent_entry\x18\n \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05\x12!\n\x14\x66ully_qualified_name\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12@\n\x0c\x65ntry_source\x18\x0f \x01(\x0b\x32%.google.cloud.dataplex.v1.EntrySourceB\x03\xe0\x41\x01\x1aP\n\x0c\x41spectsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12/\n\x05value\x18\x02 \x01(\x0b\x32 .google.cloud.dataplex.v1.Aspect:\x02\x38\x01:\x86\x01\xea\x41\x82\x01\n\x1d\x64\x61taplex.googleapis.com/Entry\x12Qprojects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}*\x07\x65ntries2\x05\x65ntry\"\xba\x03\n\x0b\x45ntrySource\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x0e\n\x06system\x18\x02 \x01(\t\x12\x10\n\x08platform\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x41\n\x06labels\x18\x07 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.EntrySource.LabelsEntry\x12\x46\n\tancestors\x18\t \x03(\x0b\x32..google.cloud.dataplex.v1.EntrySource.AncestorB\x03\xe0\x41\x05\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x30\n\x08\x41ncestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xcd\x01\n\x17\x43reateEntryGroupRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x65ntry_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x65ntry_group\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateEntryGroupRequest\x12>\n\x0b\x65ntry_group\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.EntryGroupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListEntryGroupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListEntryGroupsResponse\x12:\n\x0c\x65ntry_groups\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.EntryGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetEntryGroupRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\"\xc9\x01\n\x16\x43reateEntryTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1a\n\rentry_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\nentry_type\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x16UpdateEntryTypeRequest\x12<\n\nentry_type\x18\x01 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"d\n\x16\x44\x65leteEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n\x15ListEntryTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x16ListEntryTypesResponse\x12\x38\n\x0b\x65ntry_types\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.EntryType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"N\n\x13GetEntryTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\"\xcd\x01\n\x17\x43reateAspectTypeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\x0e\x61spect_type_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x61spect_type\x18\x03 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n\x17UpdateAspectTypeRequest\x12>\n\x0b\x61spect_type\x18\x01 \x01(\x0b\x32$.google.cloud.dataplex.v1.AspectTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x17\x44\x65leteAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb0\x01\n\x16ListAspectTypesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8d\x01\n\x17ListAspectTypesResponse\x12:\n\x0c\x61spect_types\x18\x01 \x03(\x0b\x32$.google.cloud.dataplex.v1.AspectType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"P\n\x14GetAspectTypeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/AspectType\"\x9c\x01\n\x12\x43reateEntryRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x15\n\x08\x65ntry_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x05\x65ntry\x18\x03 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\"\xda\x01\n\x12UpdateEntryRequest\x12\x33\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x16\x64\x65lete_missing_aspects\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x61spect_keys\x18\x05 \x03(\tB\x03\xe0\x41\x01\"I\n\x12\x44\x65leteEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\x96\x01\n\x12ListEntriesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"`\n\x13ListEntriesResponse\x12\x30\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n\x0fGetEntryRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\"\xc4\x01\n\x12LookupEntryRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.dataplex.v1.EntryViewB\x03\xe0\x41\x01\x12\x19\n\x0c\x61spect_types\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x34\n\x05\x65ntry\x18\x05 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\"\x99\x01\n\x14SearchEntriesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05scope\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\xf6\x01\n\x13SearchEntriesResult\x12\x17\n\x0flinked_resource\x18\x08 \x01(\t\x12\x37\n\x0e\x64\x61taplex_entry\x18\t \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12H\n\x08snippets\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.SearchEntriesResult.Snippets\x1a\x43\n\x08Snippets\x12\x37\n\x0e\x64\x61taplex_entry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\"\x99\x01\n\x15SearchEntriesResponse\x12>\n\x07results\x18\x01 \x03(\x0b\x32-.google.cloud.dataplex.v1.SearchEntriesResult\x12\x12\n\ntotal_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x13\n\x0bunreachable\x18\x04 \x03(\t*Q\n\tEntryView\x12\x1a\n\x16\x45NTRY_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\x12\x07\n\x03\x41LL\x10\x04*p\n\x0eTransferStatus\x12\x1f\n\x1bTRANSFER_STATUS_UNSPECIFIED\x10\x00\x12\x1c\n\x18TRANSFER_STATUS_MIGRATED\x10\x01\x12\x1f\n\x1bTRANSFER_STATUS_TRANSFERRED\x10\x02\x32\x82#\n\x0e\x43\x61talogService\x12\xea\x01\n\x0f\x43reateEntryType\x12\x30.google.cloud.dataplex.v1.CreateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x1fparent,entry_type,entry_type_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/entryTypes:\nentry_type\x12\xec\x01\n\x0fUpdateEntryType\x12\x30.google.cloud.dataplex.v1.UpdateEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1e\n\tEntryType\x12\x11OperationMetadata\xda\x41\x16\x65ntry_type,update_mask\x82\xd3\xe4\x93\x02G29/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}:\nentry_type\x12\xce\x01\n\x0f\x44\x65leteEntryType\x12\x30.google.cloud.dataplex.v1.DeleteEntryTypeRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xb4\x01\n\x0eListEntryTypes\x12/.google.cloud.dataplex.v1.ListEntryTypesRequest\x1a\x30.google.cloud.dataplex.v1.ListEntryTypesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/entryTypes\x12\xa1\x01\n\x0cGetEntryType\x12-.google.cloud.dataplex.v1.GetEntryTypeRequest\x1a#.google.cloud.dataplex.v1.EntryType\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/entryTypes/*}\x12\xf1\x01\n\x10\x43reateAspectType\x12\x31.google.cloud.dataplex.v1.CreateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41!parent,aspect_type,aspect_type_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/aspectTypes:\x0b\x61spect_type\x12\xf3\x01\n\x10UpdateAspectType\x12\x31.google.cloud.dataplex.v1.UpdateAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nAspectType\x12\x11OperationMetadata\xda\x41\x17\x61spect_type,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}:\x0b\x61spect_type\x12\xd1\x01\n\x10\x44\x65leteAspectType\x12\x31.google.cloud.dataplex.v1.DeleteAspectTypeRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xb8\x01\n\x0fListAspectTypes\x12\x30.google.cloud.dataplex.v1.ListAspectTypesRequest\x1a\x31.google.cloud.dataplex.v1.ListAspectTypesResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/aspectTypes\x12\xa5\x01\n\rGetAspectType\x12..google.cloud.dataplex.v1.GetAspectTypeRequest\x1a$.google.cloud.dataplex.v1.AspectType\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/aspectTypes/*}\x12\xf1\x01\n\x10\x43reateEntryGroup\x12\x31.google.cloud.dataplex.v1.CreateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41!parent,entry_group,entry_group_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/entryGroups:\x0b\x65ntry_group\x12\xf3\x01\n\x10UpdateEntryGroup\x12\x31.google.cloud.dataplex.v1.UpdateEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nEntryGroup\x12\x11OperationMetadata\xda\x41\x17\x65ntry_group,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}:\x0b\x65ntry_group\x12\xd1\x01\n\x10\x44\x65leteEntryGroup\x12\x31.google.cloud.dataplex.v1.DeleteEntryGroupRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xb8\x01\n\x0fListEntryGroups\x12\x30.google.cloud.dataplex.v1.ListEntryGroupsRequest\x1a\x31.google.cloud.dataplex.v1.ListEntryGroupsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/entryGroups\x12\xa5\x01\n\rGetEntryGroup\x12..google.cloud.dataplex.v1.GetEntryGroupRequest\x1a$.google.cloud.dataplex.v1.EntryGroup\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/entryGroups/*}\x12\xbe\x01\n\x0b\x43reateEntry\x12,.google.cloud.dataplex.v1.CreateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"`\xda\x41\x15parent,entry,entry_id\x82\xd3\xe4\x93\x02\x42\"9/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:\x05\x65ntry\x12\xc1\x01\n\x0bUpdateEntry\x12,.google.cloud.dataplex.v1.UpdateEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"c\xda\x41\x11\x65ntry,update_mask\x82\xd3\xe4\x93\x02I2@/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/**}:\x05\x65ntry\x12\xa7\x01\n\x0b\x44\x65leteEntry\x12,.google.cloud.dataplex.v1.DeleteEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\xb6\x01\n\x0bListEntries\x12,.google.cloud.dataplex.v1.ListEntriesRequest\x1a-.google.cloud.dataplex.v1.ListEntriesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/entryGroups/*}/entries\x12\xa1\x01\n\x08GetEntry\x12).google.cloud.dataplex.v1.GetEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}\x12\x93\x01\n\x0bLookupEntry\x12,.google.cloud.dataplex.v1.LookupEntryRequest\x1a\x1f.google.cloud.dataplex.v1.Entry\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*}:lookupEntry\x12\xb6\x01\n\rSearchEntries\x12..google.cloud.dataplex.v1.SearchEntriesRequest\x1a/.google.cloud.dataplex.v1.SearchEntriesResponse\"D\xda\x41\nname,query\x82\xd3\xe4\x93\x02\x31\"//v1/{name=projects/*/locations/*}:searchEntries\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbc\x01\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x43\x61talogProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xaa\x02\x18Google.Cloud.Dataplex.V1\xca\x02\x18Google\\Cloud\\Dataplex\\V1\xea\x02\x1bGoogle::Cloud::Dataplex::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.Struct", "google/protobuf/struct.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - AspectType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType").msgclass - AspectType::Authorization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.Authorization").msgclass - AspectType::MetadataTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate").msgclass - AspectType::MetadataTemplate::EnumValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue").msgclass - AspectType::MetadataTemplate::Constraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints").msgclass - AspectType::MetadataTemplate::Annotations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations").msgclass - EntryGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryGroup").msgclass - EntryType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryType").msgclass - EntryType::AspectInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryType.AspectInfo").msgclass - EntryType::Authorization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryType.Authorization").msgclass - Aspect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Aspect").msgclass - AspectSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AspectSource").msgclass - Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Entry").msgclass - EntrySource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntrySource").msgclass - EntrySource::Ancestor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntrySource.Ancestor").msgclass - CreateEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEntryGroupRequest").msgclass - UpdateEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEntryGroupRequest").msgclass - DeleteEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEntryGroupRequest").msgclass - ListEntryGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryGroupsRequest").msgclass - ListEntryGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryGroupsResponse").msgclass - GetEntryGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEntryGroupRequest").msgclass - CreateEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEntryTypeRequest").msgclass - UpdateEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEntryTypeRequest").msgclass - DeleteEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEntryTypeRequest").msgclass - ListEntryTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryTypesRequest").msgclass - ListEntryTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntryTypesResponse").msgclass - GetEntryTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEntryTypeRequest").msgclass - CreateAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateAspectTypeRequest").msgclass - UpdateAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateAspectTypeRequest").msgclass - DeleteAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteAspectTypeRequest").msgclass - ListAspectTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAspectTypesRequest").msgclass - ListAspectTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAspectTypesResponse").msgclass - GetAspectTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetAspectTypeRequest").msgclass - CreateEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEntryRequest").msgclass - UpdateEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEntryRequest").msgclass - DeleteEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEntryRequest").msgclass - ListEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntriesRequest").msgclass - ListEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEntriesResponse").msgclass - GetEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEntryRequest").msgclass - LookupEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.LookupEntryRequest").msgclass - SearchEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesRequest").msgclass - SearchEntriesResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesResult").msgclass - SearchEntriesResult::Snippets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesResult.Snippets").msgclass - SearchEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SearchEntriesResponse").msgclass - EntryView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryView").enummodule - TransferStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.TransferStatus").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb deleted file mode 100644 index 23ba3815dfd4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" - -require "google/cloud/dataplex/v1/catalog_service/credentials" -require "google/cloud/dataplex/v1/catalog_service/paths" -require "google/cloud/dataplex/v1/catalog_service/operations" -require "google/cloud/dataplex/v1/catalog_service/client" -require "google/cloud/dataplex/v1/catalog_service/rest" - -module Google - module Cloud - module Dataplex - module 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. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1/catalog_service" - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/dataplex/v1/catalog_service/rest" - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - module CatalogService - end - end - end - end -end - -helper_path = ::File.join __dir__, "catalog_service", "helpers.rb" -require "google/cloud/dataplex/v1/catalog_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb deleted file mode 100644 index 7a7b990936b5..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb +++ /dev/null @@ -1,2797 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/catalog_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - ## - # Client for the CatalogService service. - # - # 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. - # - class Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :catalog_service_stub - - ## - # Configure the CatalogService Client class. - # - # See {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CatalogService clients - # ::Google::Cloud::Dataplex::V1::CatalogService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_entry_type.timeout = 60.0 - - default_config.rpcs.update_entry_type.timeout = 60.0 - - default_config.rpcs.delete_entry_type.timeout = 60.0 - - default_config.rpcs.list_entry_types.timeout = 60.0 - default_config.rpcs.list_entry_types.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry_type.timeout = 60.0 - default_config.rpcs.get_entry_type.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_aspect_type.timeout = 60.0 - - default_config.rpcs.update_aspect_type.timeout = 60.0 - - default_config.rpcs.delete_aspect_type.timeout = 60.0 - - default_config.rpcs.list_aspect_types.timeout = 60.0 - default_config.rpcs.list_aspect_types.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_aspect_type.timeout = 60.0 - default_config.rpcs.get_aspect_type.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_entry_group.timeout = 60.0 - - default_config.rpcs.update_entry_group.timeout = 60.0 - - default_config.rpcs.delete_entry_group.timeout = 60.0 - - default_config.rpcs.list_entry_groups.timeout = 60.0 - default_config.rpcs.list_entry_groups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry_group.timeout = 60.0 - default_config.rpcs.get_entry_group.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_entry.timeout = 60.0 - - default_config.rpcs.update_entry.timeout = 60.0 - default_config.rpcs.update_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.delete_entry.timeout = 60.0 - - default_config.rpcs.list_entries.timeout = 20.0 - default_config.rpcs.list_entries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry.timeout = 20.0 - default_config.rpcs.get_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.lookup_entry.timeout = 20.0 - default_config.rpcs.lookup_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.search_entries.timeout = 60.0 - default_config.rpcs.search_entries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CatalogService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @catalog_service_stub.universe_domain - end - - ## - # Create a new CatalogService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CatalogService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/dataplex/v1/catalog_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @catalog_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dataplex::V1::CatalogService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @catalog_service_stub.endpoint - config.universe_domain = @catalog_service_stub.universe_domain - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @catalog_service_stub.endpoint - config.universe_domain = @catalog_service_stub.universe_domain - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::CatalogService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Creates an EntryType - # - # @overload create_entry_type(request, options = nil) - # Pass arguments to `create_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_entry_type(parent: nil, entry_type_id: nil, entry_type: nil, validate_only: nil) - # Pass arguments to `create_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the EntryType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a GCP region. - # @param entry_type_id [::String] - # Required. EntryType identifier. - # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] - # Required. EntryType Resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new - # - # # Call the create_entry_type method. - # result = client.create_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_entry_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :create_entry_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a EntryType resource. - # - # @overload update_entry_type(request, options = nil) - # Pass arguments to `update_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_entry_type(entry_type: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] - # Required. EntryType Resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new - # - # # Call the update_entry_type method. - # result = client.update_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.entry_type&.name - header_params["entry_type.name"] = request.entry_type.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_entry_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :update_entry_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a EntryType resource. - # - # @overload delete_entry_type(request, options = nil) - # Pass arguments to `delete_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_entry_type(name: nil, etag: nil) - # Pass arguments to `delete_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryTypeRequest method returns an ABORTED error response - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new - # - # # Call the delete_entry_type method. - # result = client.delete_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_entry_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :delete_entry_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists EntryType resources in a project and location. - # - # @overload list_entry_types(request, options = nil) - # Pass arguments to `list_entry_types` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntryTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_entry_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_entry_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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 order_by [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new - # - # # Call the list_entry_types method. - # result = client.list_entry_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. - # p item - # end - # - def list_entry_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_entry_types.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_entry_types.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_entry_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :list_entry_types, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entry_types, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a EntryType resource. - # - # @overload get_entry_type(request, options = nil) - # Pass arguments to `get_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_entry_type(name: nil) - # Pass arguments to `get_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryType] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new - # - # # Call the get_entry_type method. - # result = client.get_entry_type request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. - # p result - # - def get_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_entry_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :get_entry_type, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an AspectType - # - # @overload create_aspect_type(request, options = nil) - # Pass arguments to `create_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_aspect_type(parent: nil, aspect_type_id: nil, aspect_type: nil, validate_only: nil) - # Pass arguments to `create_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the AspectType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a GCP region. - # @param aspect_type_id [::String] - # Required. AspectType identifier. - # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] - # Required. AspectType Resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new - # - # # Call the create_aspect_type method. - # result = client.create_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_aspect_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :create_aspect_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a AspectType resource. - # - # @overload update_aspect_type(request, options = nil) - # Pass arguments to `update_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_aspect_type(aspect_type: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] - # Required. AspectType Resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new - # - # # Call the update_aspect_type method. - # result = client.update_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.aspect_type&.name - header_params["aspect_type.name"] = request.aspect_type.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_aspect_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :update_aspect_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a AspectType resource. - # - # @overload delete_aspect_type(request, options = nil) - # Pass arguments to `delete_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_aspect_type(name: nil, etag: nil) - # Pass arguments to `delete_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteAspectTypeRequest method returns an ABORTED error response - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new - # - # # Call the delete_aspect_type method. - # result = client.delete_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_aspect_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :delete_aspect_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists AspectType resources in a project and location. - # - # @overload list_aspect_types(request, options = nil) - # Pass arguments to `list_aspect_types` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAspectTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_aspect_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_aspect_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # 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. - # @param page_token [::String] - # 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. - # @param filter [::String] - # 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 order_by [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new - # - # # Call the list_aspect_types method. - # result = client.list_aspect_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. - # p item - # end - # - def list_aspect_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_aspect_types.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_aspect_types.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_aspect_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :list_aspect_types, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_aspect_types, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a AspectType resource. - # - # @overload get_aspect_type(request, options = nil) - # Pass arguments to `get_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_aspect_type(name: nil) - # Pass arguments to `get_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::AspectType] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new - # - # # Call the get_aspect_type method. - # result = client.get_aspect_type request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. - # p result - # - def get_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_aspect_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :get_aspect_type, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an EntryGroup - # - # @overload create_entry_group(request, options = nil) - # Pass arguments to `create_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil, validate_only: nil) - # Pass arguments to `create_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 entry_group_id [::String] - # Required. EntryGroup identifier. - # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] - # Required. EntryGroup Resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new - # - # # Call the create_entry_group method. - # result = client.create_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_entry_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :create_entry_group, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a EntryGroup resource. - # - # @overload update_entry_group(request, options = nil) - # Pass arguments to `update_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_entry_group(entry_group: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] - # Required. EntryGroup Resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new - # - # # Call the update_entry_group method. - # result = client.update_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.entry_group&.name - header_params["entry_group.name"] = request.entry_group.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_entry_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :update_entry_group, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a EntryGroup resource. - # - # @overload delete_entry_group(request, options = nil) - # Pass arguments to `delete_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_entry_group(name: nil, etag: nil) - # Pass arguments to `delete_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryGroupRequest method returns an ABORTED error response - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new - # - # # Call the delete_entry_group method. - # result = client.delete_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_entry_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :delete_entry_group, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists EntryGroup resources in a project and location. - # - # @overload list_entry_groups(request, options = nil) - # Pass arguments to `list_entry_groups` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_entry_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_entry_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # 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. - # @param page_token [::String] - # 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. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new - # - # # Call the list_entry_groups method. - # result = client.list_entry_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. - # p item - # end - # - def list_entry_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_entry_groups.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_entry_groups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_entry_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :list_entry_groups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entry_groups, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a EntryGroup resource. - # - # @overload get_entry_group(request, options = nil) - # Pass arguments to `get_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_entry_group(name: nil) - # Pass arguments to `get_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryGroup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new - # - # # Call the get_entry_group method. - # result = client.get_entry_group request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. - # p result - # - def get_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_entry_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :get_entry_group, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an Entry. - # - # @overload create_entry(request, options = nil) - # Pass arguments to `create_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_entry(parent: nil, entry_id: nil, entry: nil) - # Pass arguments to `create_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @param entry_id [::String] - # 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 - # `//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 - # Cloud. - # - # The maximum size of the field is 4000 characters. - # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] - # Required. Entry resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new - # - # # Call the create_entry method. - # result = client.create_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def create_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :create_entry, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an Entry. - # - # @overload update_entry(request, options = nil) - # Pass arguments to `update_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_entry(entry: nil, update_mask: nil, allow_missing: nil, delete_missing_aspects: nil, aspect_keys: nil) - # Pass arguments to `update_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] - # Required. Entry resource. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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. - # @param allow_missing [::Boolean] - # Optional. If set to true and the entry does not exist, it will be created. - # @param delete_missing_aspects [::Boolean] - # 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. - # @param aspect_keys [::Array<::String>] - # 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 - # `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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new - # - # # Call the update_entry method. - # result = client.update_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def update_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.entry&.name - header_params["entry.name"] = request.entry.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :update_entry, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an Entry. - # - # @overload delete_entry(request, options = nil) - # Pass arguments to `delete_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_entry(name: nil) - # Pass arguments to `delete_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new - # - # # Call the delete_entry method. - # result = client.delete_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def delete_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :delete_entry, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists entries within an entry group. - # - # @overload list_entries(request, options = nil) - # Pass arguments to `list_entries` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_entries(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_entries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @param page_size [::Integer] - # @param page_token [::String] - # Optional. The pagination token returned by a previous request. - # @param filter [::String] - # 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" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new - # - # # Call the list_entries method. - # result = client.list_entries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. - # p item - # end - # - def list_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_entries.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_entries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :list_entries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entries, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a single entry. - # - # @overload get_entry(request, options = nil) - # Pass arguments to `get_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_entry(name: nil, view: nil, aspect_types: nil, paths: nil) - # Pass arguments to `get_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @param view [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View for controlling which parts of an entry are to be returned. - # @param aspect_types [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # Only works if the CUSTOM view is selected. - # @param paths [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. Only works if the CUSTOM view is selected. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryRequest.new - # - # # Call the get_entry method. - # result = client.get_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def get_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :get_entry, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Looks up a single entry. - # - # @overload lookup_entry(request, options = nil) - # Pass arguments to `lookup_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::LookupEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload lookup_entry(name: nil, view: nil, aspect_types: nil, paths: nil, entry: nil) - # Pass arguments to `lookup_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/{location}`. - # @param view [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View for controlling which parts of an entry are to be returned. - # @param aspect_types [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # Only works if the CUSTOM view is selected. - # @param paths [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. Only works if the CUSTOM view is selected. - # @param entry [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new - # - # # Call the lookup_entry method. - # result = client.lookup_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def lookup_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.lookup_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.lookup_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.lookup_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :lookup_entry, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Searches for entries matching given query and scope. - # - # @overload search_entries(request, options = nil) - # Pass arguments to `search_entries` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::SearchEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil) - # Pass arguments to `search_entries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/{location}`. - # @param query [::String] - # Required. The query against which entries in scope should be matched. - # @param page_size [::Integer] - # Optional. Pagination. - # @param page_token [::String] - # @param order_by [::String] - # Optional. Ordering of the results. Supported options to be added later. - # @param scope [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new - # - # # Call the search_entries method. - # result = client.search_entries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. - # p item - # end - # - def search_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::SearchEntriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.search_entries.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.search_entries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :search_entries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :search_entries, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CatalogService API. - # - # This class represents the configuration for CatalogService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_entry_type to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::CatalogService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_entry_type.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_entry_type.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CatalogService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry_type - ## - # RPC-specific configuration for `update_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry_type - ## - # RPC-specific configuration for `delete_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry_type - ## - # RPC-specific configuration for `list_entry_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entry_types - ## - # RPC-specific configuration for `get_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry_type - ## - # RPC-specific configuration for `create_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :create_aspect_type - ## - # RPC-specific configuration for `update_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :update_aspect_type - ## - # RPC-specific configuration for `delete_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_aspect_type - ## - # RPC-specific configuration for `list_aspect_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_aspect_types - ## - # RPC-specific configuration for `get_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_aspect_type - ## - # RPC-specific configuration for `create_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry_group - ## - # RPC-specific configuration for `update_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry_group - ## - # RPC-specific configuration for `delete_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry_group - ## - # RPC-specific configuration for `list_entry_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entry_groups - ## - # RPC-specific configuration for `get_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry_group - ## - # RPC-specific configuration for `create_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry - ## - # RPC-specific configuration for `update_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry - ## - # RPC-specific configuration for `delete_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry - ## - # RPC-specific configuration for `list_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entries - ## - # RPC-specific configuration for `get_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry - ## - # RPC-specific configuration for `lookup_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_entry - ## - # RPC-specific configuration for `search_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :search_entries - - # @private - def initialize parent_rpcs = nil - create_entry_type_config = parent_rpcs.create_entry_type if parent_rpcs.respond_to? :create_entry_type - @create_entry_type = ::Gapic::Config::Method.new create_entry_type_config - update_entry_type_config = parent_rpcs.update_entry_type if parent_rpcs.respond_to? :update_entry_type - @update_entry_type = ::Gapic::Config::Method.new update_entry_type_config - delete_entry_type_config = parent_rpcs.delete_entry_type if parent_rpcs.respond_to? :delete_entry_type - @delete_entry_type = ::Gapic::Config::Method.new delete_entry_type_config - list_entry_types_config = parent_rpcs.list_entry_types if parent_rpcs.respond_to? :list_entry_types - @list_entry_types = ::Gapic::Config::Method.new list_entry_types_config - get_entry_type_config = parent_rpcs.get_entry_type if parent_rpcs.respond_to? :get_entry_type - @get_entry_type = ::Gapic::Config::Method.new get_entry_type_config - create_aspect_type_config = parent_rpcs.create_aspect_type if parent_rpcs.respond_to? :create_aspect_type - @create_aspect_type = ::Gapic::Config::Method.new create_aspect_type_config - update_aspect_type_config = parent_rpcs.update_aspect_type if parent_rpcs.respond_to? :update_aspect_type - @update_aspect_type = ::Gapic::Config::Method.new update_aspect_type_config - delete_aspect_type_config = parent_rpcs.delete_aspect_type if parent_rpcs.respond_to? :delete_aspect_type - @delete_aspect_type = ::Gapic::Config::Method.new delete_aspect_type_config - list_aspect_types_config = parent_rpcs.list_aspect_types if parent_rpcs.respond_to? :list_aspect_types - @list_aspect_types = ::Gapic::Config::Method.new list_aspect_types_config - get_aspect_type_config = parent_rpcs.get_aspect_type if parent_rpcs.respond_to? :get_aspect_type - @get_aspect_type = ::Gapic::Config::Method.new get_aspect_type_config - create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group - @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config - update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group - @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config - delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group - @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config - list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups - @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config - get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group - @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config - create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry - @create_entry = ::Gapic::Config::Method.new create_entry_config - update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry - @update_entry = ::Gapic::Config::Method.new update_entry_config - delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry - @delete_entry = ::Gapic::Config::Method.new delete_entry_config - list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries - @list_entries = ::Gapic::Config::Method.new list_entries_config - get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry - @get_entry = ::Gapic::Config::Method.new get_entry_config - lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry - @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config - search_entries_config = parent_rpcs.search_entries if parent_rpcs.respond_to? :search_entries - @search_entries = ::Gapic::Config::Method.new search_entries_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb deleted file mode 100644 index 1b328b2e7752..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - # Credentials for the CatalogService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb deleted file mode 100644 index 87e2bfd1d4a0..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb +++ /dev/null @@ -1,801 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CatalogService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CatalogService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb deleted file mode 100644 index 465f22f78019..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - # Path helper methods for the CatalogService API. - module Paths - ## - # Create a fully-qualified AspectType resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/aspectTypes/{aspect_type}` - # - # @param project [String] - # @param location [String] - # @param aspect_type [String] - # - # @return [::String] - def aspect_type_path project:, location:, aspect_type: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/aspectTypes/#{aspect_type}" - end - - ## - # Create a fully-qualified Entry resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}` - # - # @param project [String] - # @param location [String] - # @param entry_group [String] - # @param entry [String] - # - # @return [::String] - def entry_path project:, location:, entry_group:, entry: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "entry_group cannot contain /" if entry_group.to_s.include? "/" - - "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}/entries/#{entry}" - end - - ## - # Create a fully-qualified EntryGroup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/entryGroups/{entry_group}` - # - # @param project [String] - # @param location [String] - # @param entry_group [String] - # - # @return [::String] - def entry_group_path project:, location:, entry_group: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}" - end - - ## - # Create a fully-qualified EntryType resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/entryTypes/{entry_type}` - # - # @param project [String] - # @param location [String] - # @param entry_type [String] - # - # @return [::String] - def entry_type_path project:, location:, entry_type: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/entryTypes/#{entry_type}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb deleted file mode 100644 index 364eb0c5e5a8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/catalog_service/credentials" -require "google/cloud/dataplex/v1/catalog_service/paths" -require "google/cloud/dataplex/v1/catalog_service/rest/operations" -require "google/cloud/dataplex/v1/catalog_service/rest/client" - -module Google - module Cloud - module Dataplex - module 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. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/catalog_service/rest" - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - module CatalogService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/catalog_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb deleted file mode 100644 index 398eb9db3daa..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +++ /dev/null @@ -1,2622 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/catalog_pb" -require "google/cloud/dataplex/v1/catalog_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - module Rest - ## - # REST client for the CatalogService service. - # - # 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. - # - class Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :catalog_service_stub - - ## - # Configure the CatalogService Client class. - # - # See {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CatalogService clients - # ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_entry_type.timeout = 60.0 - - default_config.rpcs.update_entry_type.timeout = 60.0 - - default_config.rpcs.delete_entry_type.timeout = 60.0 - - default_config.rpcs.list_entry_types.timeout = 60.0 - default_config.rpcs.list_entry_types.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry_type.timeout = 60.0 - default_config.rpcs.get_entry_type.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_aspect_type.timeout = 60.0 - - default_config.rpcs.update_aspect_type.timeout = 60.0 - - default_config.rpcs.delete_aspect_type.timeout = 60.0 - - default_config.rpcs.list_aspect_types.timeout = 60.0 - default_config.rpcs.list_aspect_types.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_aspect_type.timeout = 60.0 - default_config.rpcs.get_aspect_type.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_entry_group.timeout = 60.0 - - default_config.rpcs.update_entry_group.timeout = 60.0 - - default_config.rpcs.delete_entry_group.timeout = 60.0 - - default_config.rpcs.list_entry_groups.timeout = 60.0 - default_config.rpcs.list_entry_groups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry_group.timeout = 60.0 - default_config.rpcs.get_entry_group.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_entry.timeout = 60.0 - - default_config.rpcs.update_entry.timeout = 60.0 - default_config.rpcs.update_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.delete_entry.timeout = 60.0 - - default_config.rpcs.list_entries.timeout = 20.0 - default_config.rpcs.list_entries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry.timeout = 20.0 - default_config.rpcs.get_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.lookup_entry.timeout = 20.0 - default_config.rpcs.lookup_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.search_entries.timeout = 60.0 - default_config.rpcs.search_entries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CatalogService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @catalog_service_stub.universe_domain - end - - ## - # Create a new CatalogService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CatalogService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @catalog_service_stub = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @catalog_service_stub.endpoint - config.universe_domain = @catalog_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @catalog_service_stub.endpoint - config.universe_domain = @catalog_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::CatalogService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Creates an EntryType - # - # @overload create_entry_type(request, options = nil) - # Pass arguments to `create_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_entry_type(parent: nil, entry_type_id: nil, entry_type: nil, validate_only: nil) - # Pass arguments to `create_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the EntryType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a GCP region. - # @param entry_type_id [::String] - # Required. EntryType identifier. - # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] - # Required. EntryType Resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new - # - # # Call the create_entry_type method. - # result = client.create_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_entry_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.create_entry_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a EntryType resource. - # - # @overload update_entry_type(request, options = nil) - # Pass arguments to `update_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_entry_type(entry_type: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] - # Required. EntryType Resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new - # - # # Call the update_entry_type method. - # result = client.update_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_entry_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.update_entry_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a EntryType resource. - # - # @overload delete_entry_type(request, options = nil) - # Pass arguments to `delete_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_entry_type(name: nil, etag: nil) - # Pass arguments to `delete_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryTypeRequest method returns an ABORTED error response - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new - # - # # Call the delete_entry_type method. - # result = client.delete_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_entry_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.delete_entry_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists EntryType resources in a project and location. - # - # @overload list_entry_types(request, options = nil) - # Pass arguments to `list_entry_types` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntryTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_entry_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_entry_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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 order_by [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new - # - # # Call the list_entry_types method. - # result = client.list_entry_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. - # p item - # end - # - def list_entry_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_entry_types.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_entry_types.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_entry_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.list_entry_types request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a EntryType resource. - # - # @overload get_entry_type(request, options = nil) - # Pass arguments to `get_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_entry_type(name: nil) - # Pass arguments to `get_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new - # - # # Call the get_entry_type method. - # result = client.get_entry_type request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. - # p result - # - def get_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_entry_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_entry_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.get_entry_type request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an AspectType - # - # @overload create_aspect_type(request, options = nil) - # Pass arguments to `create_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_aspect_type(parent: nil, aspect_type_id: nil, aspect_type: nil, validate_only: nil) - # Pass arguments to `create_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the AspectType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a GCP region. - # @param aspect_type_id [::String] - # Required. AspectType identifier. - # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] - # Required. AspectType Resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new - # - # # Call the create_aspect_type method. - # result = client.create_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_aspect_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.create_aspect_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a AspectType resource. - # - # @overload update_aspect_type(request, options = nil) - # Pass arguments to `update_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_aspect_type(aspect_type: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] - # Required. AspectType Resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new - # - # # Call the update_aspect_type method. - # result = client.update_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_aspect_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.update_aspect_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a AspectType resource. - # - # @overload delete_aspect_type(request, options = nil) - # Pass arguments to `delete_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_aspect_type(name: nil, etag: nil) - # Pass arguments to `delete_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteAspectTypeRequest method returns an ABORTED error response - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new - # - # # Call the delete_aspect_type method. - # result = client.delete_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_aspect_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.delete_aspect_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists AspectType resources in a project and location. - # - # @overload list_aspect_types(request, options = nil) - # Pass arguments to `list_aspect_types` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAspectTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_aspect_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_aspect_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # 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. - # @param page_token [::String] - # 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. - # @param filter [::String] - # 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 order_by [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new - # - # # Call the list_aspect_types method. - # result = client.list_aspect_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. - # p item - # end - # - def list_aspect_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_aspect_types.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_aspect_types.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_aspect_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.list_aspect_types request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a AspectType resource. - # - # @overload get_aspect_type(request, options = nil) - # Pass arguments to `get_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_aspect_type(name: nil) - # Pass arguments to `get_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::AspectType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new - # - # # Call the get_aspect_type method. - # result = client.get_aspect_type request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. - # p result - # - def get_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_aspect_type.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_aspect_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.get_aspect_type request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an EntryGroup - # - # @overload create_entry_group(request, options = nil) - # Pass arguments to `create_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil, validate_only: nil) - # Pass arguments to `create_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 entry_group_id [::String] - # Required. EntryGroup identifier. - # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] - # Required. EntryGroup Resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new - # - # # Call the create_entry_group method. - # result = client.create_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_entry_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.create_entry_group request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a EntryGroup resource. - # - # @overload update_entry_group(request, options = nil) - # Pass arguments to `update_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_entry_group(entry_group: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] - # Required. EntryGroup Resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new - # - # # Call the update_entry_group method. - # result = client.update_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_entry_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.update_entry_group request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a EntryGroup resource. - # - # @overload delete_entry_group(request, options = nil) - # Pass arguments to `delete_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_entry_group(name: nil, etag: nil) - # Pass arguments to `delete_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryGroupRequest method returns an ABORTED error response - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new - # - # # Call the delete_entry_group method. - # result = client.delete_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_entry_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.delete_entry_group request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists EntryGroup resources in a project and location. - # - # @overload list_entry_groups(request, options = nil) - # Pass arguments to `list_entry_groups` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_entry_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_entry_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # 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. - # @param page_token [::String] - # 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. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new - # - # # Call the list_entry_groups method. - # result = client.list_entry_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. - # p item - # end - # - def list_entry_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_entry_groups.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_entry_groups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_entry_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.list_entry_groups request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a EntryGroup resource. - # - # @overload get_entry_group(request, options = nil) - # Pass arguments to `get_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_entry_group(name: nil) - # Pass arguments to `get_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new - # - # # Call the get_entry_group method. - # result = client.get_entry_group request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. - # p result - # - def get_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_entry_group.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_entry_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.get_entry_group request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an Entry. - # - # @overload create_entry(request, options = nil) - # Pass arguments to `create_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_entry(parent: nil, entry_id: nil, entry: nil) - # Pass arguments to `create_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @param entry_id [::String] - # 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 - # `//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 - # Cloud. - # - # The maximum size of the field is 4000 characters. - # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] - # Required. Entry resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new - # - # # Call the create_entry method. - # result = client.create_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def create_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.create_entry request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an Entry. - # - # @overload update_entry(request, options = nil) - # Pass arguments to `update_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_entry(entry: nil, update_mask: nil, allow_missing: nil, delete_missing_aspects: nil, aspect_keys: nil) - # Pass arguments to `update_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] - # Required. Entry resource. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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. - # @param allow_missing [::Boolean] - # Optional. If set to true and the entry does not exist, it will be created. - # @param delete_missing_aspects [::Boolean] - # 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. - # @param aspect_keys [::Array<::String>] - # 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 - # `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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new - # - # # Call the update_entry method. - # result = client.update_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def update_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.update_entry request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an Entry. - # - # @overload delete_entry(request, options = nil) - # Pass arguments to `delete_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_entry(name: nil) - # Pass arguments to `delete_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new - # - # # Call the delete_entry method. - # result = client.delete_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def delete_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.delete_entry request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists entries within an entry group. - # - # @overload list_entries(request, options = nil) - # Pass arguments to `list_entries` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_entries(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_entries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @param page_size [::Integer] - # @param page_token [::String] - # Optional. The pagination token returned by a previous request. - # @param filter [::String] - # 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" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new - # - # # Call the list_entries method. - # result = client.list_entries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. - # p item - # end - # - def list_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_entries.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_entries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.list_entries request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_entries, "entries", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a single entry. - # - # @overload get_entry(request, options = nil) - # Pass arguments to `get_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_entry(name: nil, view: nil, aspect_types: nil, paths: nil) - # Pass arguments to `get_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @param view [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View for controlling which parts of an entry are to be returned. - # @param aspect_types [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # Only works if the CUSTOM view is selected. - # @param paths [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. Only works if the CUSTOM view is selected. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryRequest.new - # - # # Call the get_entry method. - # result = client.get_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def get_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.get_entry request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Looks up a single entry. - # - # @overload lookup_entry(request, options = nil) - # Pass arguments to `lookup_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::LookupEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload lookup_entry(name: nil, view: nil, aspect_types: nil, paths: nil, entry: nil) - # Pass arguments to `lookup_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/{location}`. - # @param view [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View for controlling which parts of an entry are to be returned. - # @param aspect_types [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # Only works if the CUSTOM view is selected. - # @param paths [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. Only works if the CUSTOM view is selected. - # @param entry [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new - # - # # Call the lookup_entry method. - # result = client.lookup_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def lookup_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.lookup_entry.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.lookup_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.lookup_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.lookup_entry request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Searches for entries matching given query and scope. - # - # @overload search_entries(request, options = nil) - # Pass arguments to `search_entries` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::SearchEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil) - # Pass arguments to `search_entries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/{location}`. - # @param query [::String] - # Required. The query against which entries in scope should be matched. - # @param page_size [::Integer] - # Optional. Pagination. - # @param page_token [::String] - # @param order_by [::String] - # Optional. Ordering of the results. Supported options to be added later. - # @param scope [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new - # - # # Call the search_entries method. - # result = client.search_entries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. - # p item - # end - # - def search_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::SearchEntriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.search_entries.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.search_entries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.search_entries request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CatalogService REST API. - # - # This class represents the configuration for CatalogService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_entry_type to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_entry_type.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_entry_type.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the CatalogService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry_type - ## - # RPC-specific configuration for `update_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry_type - ## - # RPC-specific configuration for `delete_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry_type - ## - # RPC-specific configuration for `list_entry_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entry_types - ## - # RPC-specific configuration for `get_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry_type - ## - # RPC-specific configuration for `create_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :create_aspect_type - ## - # RPC-specific configuration for `update_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :update_aspect_type - ## - # RPC-specific configuration for `delete_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_aspect_type - ## - # RPC-specific configuration for `list_aspect_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_aspect_types - ## - # RPC-specific configuration for `get_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_aspect_type - ## - # RPC-specific configuration for `create_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry_group - ## - # RPC-specific configuration for `update_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry_group - ## - # RPC-specific configuration for `delete_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry_group - ## - # RPC-specific configuration for `list_entry_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entry_groups - ## - # RPC-specific configuration for `get_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry_group - ## - # RPC-specific configuration for `create_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry - ## - # RPC-specific configuration for `update_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry - ## - # RPC-specific configuration for `delete_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry - ## - # RPC-specific configuration for `list_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entries - ## - # RPC-specific configuration for `get_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry - ## - # RPC-specific configuration for `lookup_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_entry - ## - # RPC-specific configuration for `search_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :search_entries - - # @private - def initialize parent_rpcs = nil - create_entry_type_config = parent_rpcs.create_entry_type if parent_rpcs.respond_to? :create_entry_type - @create_entry_type = ::Gapic::Config::Method.new create_entry_type_config - update_entry_type_config = parent_rpcs.update_entry_type if parent_rpcs.respond_to? :update_entry_type - @update_entry_type = ::Gapic::Config::Method.new update_entry_type_config - delete_entry_type_config = parent_rpcs.delete_entry_type if parent_rpcs.respond_to? :delete_entry_type - @delete_entry_type = ::Gapic::Config::Method.new delete_entry_type_config - list_entry_types_config = parent_rpcs.list_entry_types if parent_rpcs.respond_to? :list_entry_types - @list_entry_types = ::Gapic::Config::Method.new list_entry_types_config - get_entry_type_config = parent_rpcs.get_entry_type if parent_rpcs.respond_to? :get_entry_type - @get_entry_type = ::Gapic::Config::Method.new get_entry_type_config - create_aspect_type_config = parent_rpcs.create_aspect_type if parent_rpcs.respond_to? :create_aspect_type - @create_aspect_type = ::Gapic::Config::Method.new create_aspect_type_config - update_aspect_type_config = parent_rpcs.update_aspect_type if parent_rpcs.respond_to? :update_aspect_type - @update_aspect_type = ::Gapic::Config::Method.new update_aspect_type_config - delete_aspect_type_config = parent_rpcs.delete_aspect_type if parent_rpcs.respond_to? :delete_aspect_type - @delete_aspect_type = ::Gapic::Config::Method.new delete_aspect_type_config - list_aspect_types_config = parent_rpcs.list_aspect_types if parent_rpcs.respond_to? :list_aspect_types - @list_aspect_types = ::Gapic::Config::Method.new list_aspect_types_config - get_aspect_type_config = parent_rpcs.get_aspect_type if parent_rpcs.respond_to? :get_aspect_type - @get_aspect_type = ::Gapic::Config::Method.new get_aspect_type_config - create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group - @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config - update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group - @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config - delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group - @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config - list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups - @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config - get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group - @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config - create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry - @create_entry = ::Gapic::Config::Method.new create_entry_config - update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry - @update_entry = ::Gapic::Config::Method.new update_entry_config - delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry - @delete_entry = ::Gapic::Config::Method.new delete_entry_config - list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries - @list_entries = ::Gapic::Config::Method.new list_entries_config - get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry - @get_entry = ::Gapic::Config::Method.new get_entry_config - lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry - @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config - search_entries_config = parent_rpcs.search_entries if parent_rpcs.respond_to? :search_entries - @search_entries = ::Gapic::Config::Method.new search_entries_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb deleted file mode 100644 index 989b9b05ba02..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb +++ /dev/null @@ -1,895 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CatalogService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CatalogService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb deleted file mode 100644 index 260110930560..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb +++ /dev/null @@ -1,1375 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/catalog_pb" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - module Rest - ## - # REST service stub for the CatalogService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the create_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_entry_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_entry_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_entry_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_entry_types REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] - # A result object deserialized from the server's reply - def list_entry_types request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_entry_types_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # A result object deserialized from the server's reply - def get_entry_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::EntryType.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_aspect_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_aspect_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_aspect_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_aspect_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_aspect_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_aspect_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_aspect_types REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] - # A result object deserialized from the server's reply - def list_aspect_types request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_aspect_types_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::AspectType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # A result object deserialized from the server's reply - def get_aspect_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_aspect_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::AspectType.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_entry_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_entry_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_entry_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_entry_groups REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] - # A result object deserialized from the server's reply - def list_entry_groups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_entry_groups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # A result object deserialized from the server's reply - def get_entry_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::EntryGroup.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def create_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def update_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def delete_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_entries REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntriesResponse] - # A result object deserialized from the server's reply - def list_entries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_entries_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def get_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the lookup_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::LookupEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def lookup_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_lookup_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the search_entries REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::SearchEntriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] - # A result object deserialized from the server's reply - def search_entries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_entries_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the create_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_entry_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/entryTypes", - body: "entry_type", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_entry_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{entry_type.name}", - body: "entry_type", - matches: [ - ["entry_type.name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_entry_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_entry_types REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_entry_types_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/entryTypes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_entry_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_aspect_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/aspectTypes", - body: "aspect_type", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_aspect_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{aspect_type.name}", - body: "aspect_type", - matches: [ - ["aspect_type.name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_aspect_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_aspect_types REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_aspect_types_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/aspectTypes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_aspect_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_entry_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/entryGroups", - body: "entry_group", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_entry_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{entry_group.name}", - body: "entry_group", - matches: [ - ["entry_group.name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_entry_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_entry_groups REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_entry_groups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/entryGroups", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_entry_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/entries", - body: "entry", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{entry.name}", - body: "entry", - matches: [ - ["entry.name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_entries REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_entries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/entries", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the lookup_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::LookupEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_lookup_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:lookupEntry", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_entries REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::SearchEntriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_search_entries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:searchEntries", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb deleted file mode 100644 index 9a6d7d621caf..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb +++ /dev/null @@ -1,91 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/catalog.proto for package 'Google.Cloud.Dataplex.V1' -# Original file comments: -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# - -require 'grpc' -require 'google/cloud/dataplex/v1/catalog_pb' - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - # 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. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.CatalogService' - - # Creates an EntryType - rpc :CreateEntryType, ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Google::Longrunning::Operation - # Updates a EntryType resource. - rpc :UpdateEntryType, ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Google::Longrunning::Operation - # Deletes a EntryType resource. - rpc :DeleteEntryType, ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Google::Longrunning::Operation - # Lists EntryType resources in a project and location. - rpc :ListEntryTypes, ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse - # Retrieves a EntryType resource. - rpc :GetEntryType, ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Google::Cloud::Dataplex::V1::EntryType - # Creates an AspectType - rpc :CreateAspectType, ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Google::Longrunning::Operation - # Updates a AspectType resource. - rpc :UpdateAspectType, ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Google::Longrunning::Operation - # Deletes a AspectType resource. - rpc :DeleteAspectType, ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Google::Longrunning::Operation - # Lists AspectType resources in a project and location. - rpc :ListAspectTypes, ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse - # Retrieves a AspectType resource. - rpc :GetAspectType, ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Google::Cloud::Dataplex::V1::AspectType - # Creates an EntryGroup - rpc :CreateEntryGroup, ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Google::Longrunning::Operation - # Updates a EntryGroup resource. - rpc :UpdateEntryGroup, ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Google::Longrunning::Operation - # Deletes a EntryGroup resource. - rpc :DeleteEntryGroup, ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Google::Longrunning::Operation - # Lists EntryGroup resources in a project and location. - rpc :ListEntryGroups, ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse - # Retrieves a EntryGroup resource. - rpc :GetEntryGroup, ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Google::Cloud::Dataplex::V1::EntryGroup - # Creates an Entry. - rpc :CreateEntry, ::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Google::Cloud::Dataplex::V1::Entry - # Updates an Entry. - rpc :UpdateEntry, ::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Google::Cloud::Dataplex::V1::Entry - # Deletes an Entry. - rpc :DeleteEntry, ::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Google::Cloud::Dataplex::V1::Entry - # Lists entries within an entry group. - rpc :ListEntries, ::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Google::Cloud::Dataplex::V1::ListEntriesResponse - # Gets a single entry. - rpc :GetEntry, ::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Google::Cloud::Dataplex::V1::Entry - # Looks up a single entry. - rpc :LookupEntry, ::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Google::Cloud::Dataplex::V1::Entry - # Searches for entries matching given query and scope. - rpc :SearchEntries, ::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Google::Cloud::Dataplex::V1::SearchEntriesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb deleted file mode 100644 index 972edf974184..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/content.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/analyze_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n&google/cloud/dataplex/v1/content.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/analyze.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa1\x01\n\x14\x43reateContentRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x37\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.google.cloud.dataplex.v1.ContentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xa1\x01\n\x14UpdateContentRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x37\n\x07\x63ontent\x18\x02 \x01(\x0b\x32!.google.cloud.dataplex.v1.ContentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"M\n\x14\x44\x65leteContentRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Content\"\x90\x01\n\x12ListContentRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"b\n\x13ListContentResponse\x12\x32\n\x07\x63ontent\x18\x01 \x03(\x0b\x32!.google.cloud.dataplex.v1.Content\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd8\x01\n\x11GetContentRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Content\x12J\n\x04view\x18\x02 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.GetContentRequest.ContentViewB\x03\xe0\x41\x01\"@\n\x0b\x43ontentView\x12\x1c\n\x18\x43ONTENT_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x32\xad\x10\n\x0e\x43ontentService\x12\x80\x02\n\rCreateContent\x12..google.cloud.dataplex.v1.CreateContentRequest\x1a!.google.cloud.dataplex.v1.Content\"\x9b\x01\xda\x41\x0eparent,content\x82\xd3\xe4\x93\x02\x83\x01\"8/v1/{parent=projects/*/locations/*/lakes/*}/contentitems:\x07\x63ontentZ>\"3/v1/{parent=projects/*/locations/*/lakes/*}/content:\x07\x63ontent\x12\x97\x02\n\rUpdateContent\x12..google.cloud.dataplex.v1.UpdateContentRequest\x1a!.google.cloud.dataplex.v1.Content\"\xb2\x01\xda\x41\x13\x63ontent,update_mask\x82\xd3\xe4\x93\x02\x95\x01\x32\x41/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}:\x07\x63ontentZG2 e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a content. Only supports full resource update. - # - # @overload update_content(request, options = nil) - # Pass arguments to `update_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_content(update_mask: nil, content: nil, validate_only: nil) - # Pass arguments to `update_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new - # - # # Call the update_content method. - # result = client.update_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def update_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.content&.name - header_params["content.name"] = request.content.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :update_content, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a content. - # - # @overload delete_content(request, options = nil) - # Pass arguments to `delete_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_content(name: nil) - # Pass arguments to `delete_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new - # - # # Call the delete_content method. - # result = client.delete_content request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :delete_content, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a content resource. - # - # @overload get_content(request, options = nil) - # Pass arguments to `get_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_content(name: nil, view: nil) - # Pass arguments to `get_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # @param view [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView] - # Optional. Specify content view to make a partial request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetContentRequest.new - # - # # Call the get_content method. - # result = client.get_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def get_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :get_content, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # 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). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List content. - # - # @overload list_content(request, options = nil) - # Pass arguments to `list_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_content(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListContentRequest.new - # - # # Call the list_content method. - # result = client.list_content request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Content. - # p item - # end - # - def list_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :list_content, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @content_service_stub, :list_content, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ContentService API. - # - # This class represents the configuration for ContentService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_content to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::ContentService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ContentService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_content` - # @return [::Gapic::Config::Method] - # - attr_reader :create_content - ## - # RPC-specific configuration for `update_content` - # @return [::Gapic::Config::Method] - # - attr_reader :update_content - ## - # RPC-specific configuration for `delete_content` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_content - ## - # RPC-specific configuration for `get_content` - # @return [::Gapic::Config::Method] - # - attr_reader :get_content - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `list_content` - # @return [::Gapic::Config::Method] - # - attr_reader :list_content - - # @private - def initialize parent_rpcs = nil - create_content_config = parent_rpcs.create_content if parent_rpcs.respond_to? :create_content - @create_content = ::Gapic::Config::Method.new create_content_config - update_content_config = parent_rpcs.update_content if parent_rpcs.respond_to? :update_content - @update_content = ::Gapic::Config::Method.new update_content_config - delete_content_config = parent_rpcs.delete_content if parent_rpcs.respond_to? :delete_content - @delete_content = ::Gapic::Config::Method.new delete_content_config - get_content_config = parent_rpcs.get_content if parent_rpcs.respond_to? :get_content - @get_content = ::Gapic::Config::Method.new get_content_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - list_content_config = parent_rpcs.list_content if parent_rpcs.respond_to? :list_content - @list_content = ::Gapic::Config::Method.new list_content_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb deleted file mode 100644 index 19e1ffcd0c88..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module ContentService - # Credentials for the ContentService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb deleted file mode 100644 index 57ef53d237e3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - module ContentService - # Path helper methods for the ContentService API. - module Paths - ## - # Create a fully-qualified Content resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/content/{content}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param content [String] - # - # @return [::String] - def content_path project:, location:, lake:, content: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/content/#{content}" - end - - ## - # Create a fully-qualified Lake resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # - # @return [::String] - def lake_path project:, location:, lake: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb deleted file mode 100644 index 42bc1424d9a6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/content_service/credentials" -require "google/cloud/dataplex/v1/content_service/paths" -require "google/cloud/dataplex/v1/content_service/rest/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # ContentService manages Notebook and SQL Scripts for Dataplex. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/content_service/rest" - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - module ContentService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/content_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb deleted file mode 100644 index d02359ca50f4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +++ /dev/null @@ -1,1131 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/content_pb" -require "google/cloud/dataplex/v1/content_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module ContentService - module Rest - ## - # REST client for the ContentService service. - # - # ContentService manages Notebook and SQL Scripts for Dataplex. - # - class Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :content_service_stub - - ## - # Configure the ContentService Client class. - # - # See {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ContentService clients - # ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_content.timeout = 60.0 - - default_config.rpcs.update_content.timeout = 60.0 - - default_config.rpcs.delete_content.timeout = 60.0 - - default_config.rpcs.get_content.timeout = 60.0 - default_config.rpcs.get_content.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_iam_policy.timeout = 60.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_content.timeout = 60.0 - default_config.rpcs.list_content.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ContentService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @content_service_stub.universe_domain - end - - ## - # Create a new ContentService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ContentService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @content_service_stub = ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @content_service_stub.endpoint - config.universe_domain = @content_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @content_service_stub.endpoint - config.universe_domain = @content_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Create a content. - # - # @overload create_content(request, options = nil) - # Pass arguments to `create_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_content(parent: nil, content: nil, validate_only: nil) - # Pass arguments to `create_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} - # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] - # Required. Content resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateContentRequest.new - # - # # Call the create_content method. - # result = client.create_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def create_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.create_content request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a content. Only supports full resource update. - # - # @overload update_content(request, options = nil) - # Pass arguments to `update_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_content(update_mask: nil, content: nil, validate_only: nil) - # Pass arguments to `update_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new - # - # # Call the update_content method. - # result = client.update_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def update_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.update_content request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a content. - # - # @overload delete_content(request, options = nil) - # Pass arguments to `delete_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_content(name: nil) - # Pass arguments to `delete_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new - # - # # Call the delete_content method. - # result = client.delete_content request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.delete_content request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a content resource. - # - # @overload get_content(request, options = nil) - # Pass arguments to `get_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_content(name: nil, view: nil) - # Pass arguments to `get_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # @param view [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView] - # Optional. Specify content view to make a partial request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetContentRequest.new - # - # # Call the get_content method. - # result = client.get_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def get_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.get_content request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # 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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # 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). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List content. - # - # @overload list_content(request, options = nil) - # Pass arguments to `list_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_content(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListContentRequest.new - # - # # Call the list_content method. - # result = client.list_content request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Content. - # p item - # end - # - def list_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_content.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.list_content request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @content_service_stub, :list_content, "content", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ContentService REST API. - # - # This class represents the configuration for ContentService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_content to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ContentService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_content` - # @return [::Gapic::Config::Method] - # - attr_reader :create_content - ## - # RPC-specific configuration for `update_content` - # @return [::Gapic::Config::Method] - # - attr_reader :update_content - ## - # RPC-specific configuration for `delete_content` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_content - ## - # RPC-specific configuration for `get_content` - # @return [::Gapic::Config::Method] - # - attr_reader :get_content - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `list_content` - # @return [::Gapic::Config::Method] - # - attr_reader :list_content - - # @private - def initialize parent_rpcs = nil - create_content_config = parent_rpcs.create_content if parent_rpcs.respond_to? :create_content - @create_content = ::Gapic::Config::Method.new create_content_config - update_content_config = parent_rpcs.update_content if parent_rpcs.respond_to? :update_content - @update_content = ::Gapic::Config::Method.new update_content_config - delete_content_config = parent_rpcs.delete_content if parent_rpcs.respond_to? :delete_content - @delete_content = ::Gapic::Config::Method.new delete_content_config - get_content_config = parent_rpcs.get_content if parent_rpcs.respond_to? :get_content - @get_content = ::Gapic::Config::Method.new get_content_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - list_content_config = parent_rpcs.list_content if parent_rpcs.respond_to? :list_content - @list_content = ::Gapic::Config::Method.new list_content_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb deleted file mode 100644 index 4ea2e6fdf50e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb +++ /dev/null @@ -1,605 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/content_pb" - -module Google - module Cloud - module Dataplex - module V1 - module ContentService - module Rest - ## - # REST service stub for the ContentService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the create_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # A result object deserialized from the server's reply - def create_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # A result object deserialized from the server's reply - def update_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # A result object deserialized from the server's reply - def get_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListContentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListContentResponse] - # A result object deserialized from the server's reply - def list_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListContentResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the create_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/contentitems", - body: "content", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/content", - body: "content", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{content.name}", - body: "content", - matches: [ - ["content.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{content.name}", - body: "content", - matches: [ - ["content.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/contentitems", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/content", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb deleted file mode 100644 index 92e8895fbc5a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb +++ /dev/null @@ -1,77 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/content.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# - -require 'grpc' -require 'google/cloud/dataplex/v1/content_pb' - -module Google - module Cloud - module Dataplex - module V1 - module ContentService - # ContentService manages Notebook and SQL Scripts for Dataplex. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.ContentService' - - # Create a content. - rpc :CreateContent, ::Google::Cloud::Dataplex::V1::CreateContentRequest, ::Google::Cloud::Dataplex::V1::Content - # Update a content. Only supports full resource update. - rpc :UpdateContent, ::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Google::Cloud::Dataplex::V1::Content - # Delete a content. - rpc :DeleteContent, ::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Google::Protobuf::Empty - # Get a content resource. - rpc :GetContent, ::Google::Cloud::Dataplex::V1::GetContentRequest, ::Google::Cloud::Dataplex::V1::Content - # 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, ::Google::Iam::V1::Policy - # 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, ::Google::Iam::V1::Policy - # 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, ::Google::Iam::V1::TestIamPermissionsResponse - # List content. - rpc :ListContent, ::Google::Cloud::Dataplex::V1::ListContentRequest, ::Google::Cloud::Dataplex::V1::ListContentResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb deleted file mode 100644 index 81faee451353..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/data_profile.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/dataplex/v1/processing_pb' - - -descriptor_data = "\n+google/cloud/dataplex/v1/data_profile.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a)google/cloud/dataplex/v1/processing.proto\"\xa8\x04\n\x0f\x44\x61taProfileSpec\x12\x1d\n\x10sampling_percent\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x12\x17\n\nrow_filter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12Y\n\x11post_scan_actions\x18\x04 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataProfileSpec.PostScanActionsB\x03\xe0\x41\x01\x12U\n\x0einclude_fields\x18\x05 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsB\x03\xe0\x41\x01\x12U\n\x0e\x65xclude_fields\x18\x06 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsB\x03\xe0\x41\x01\x1a\xa7\x01\n\x0fPostScanActions\x12\x66\n\x0f\x62igquery_export\x18\x01 \x01(\x0b\x32H.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExportB\x03\xe0\x41\x01\x1a,\n\x0e\x42igQueryExport\x12\x1a\n\rresults_table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a*\n\x0eSelectedFields\x12\x18\n\x0b\x66ield_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\xe4\r\n\x11\x44\x61taProfileResult\x12\x11\n\trow_count\x18\x03 \x01(\x03\x12\x44\n\x07profile\x18\x04 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.DataProfileResult.Profile\x12;\n\x0cscanned_data\x18\x05 \x01(\x0b\x32%.google.cloud.dataplex.v1.ScannedData\x12h\n\x18post_scan_actions_result\x18\x06 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResultB\x03\xe0\x41\x03\x1a\xce\x08\n\x07Profile\x12I\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x39.google.cloud.dataplex.v1.DataProfileResult.Profile.Field\x1a\xf7\x07\n\x05\x46ield\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0c\n\x04mode\x18\x03 \x01(\t\x12V\n\x07profile\x18\x04 \x01(\x0b\x32\x45.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo\x1a\xeb\x06\n\x0bProfileInfo\x12\x12\n\nnull_ratio\x18\x02 \x01(\x01\x12\x16\n\x0e\x64istinct_ratio\x18\x03 \x01(\x01\x12\x65\n\x0ctop_n_values\x18\x04 \x03(\x0b\x32O.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue\x12o\n\x0estring_profile\x18\x65 \x01(\x0b\x32U.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfoH\x00\x12q\n\x0finteger_profile\x18\x66 \x01(\x0b\x32V.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfoH\x00\x12o\n\x0e\x64ouble_profile\x18g \x01(\x0b\x32U.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfoH\x00\x1aQ\n\x0fStringFieldInfo\x12\x12\n\nmin_length\x18\x01 \x01(\x03\x12\x12\n\nmax_length\x18\x02 \x01(\x03\x12\x16\n\x0e\x61verage_length\x18\x03 \x01(\x01\x1al\n\x10IntegerFieldInfo\x12\x0f\n\x07\x61verage\x18\x01 \x01(\x01\x12\x1a\n\x12standard_deviation\x18\x03 \x01(\x01\x12\x0b\n\x03min\x18\x04 \x01(\x03\x12\x11\n\tquartiles\x18\x06 \x03(\x03\x12\x0b\n\x03max\x18\x05 \x01(\x03\x1ak\n\x0f\x44oubleFieldInfo\x12\x0f\n\x07\x61verage\x18\x01 \x01(\x01\x12\x1a\n\x12standard_deviation\x18\x03 \x01(\x01\x12\x0b\n\x03min\x18\x04 \x01(\x01\x12\x11\n\tquartiles\x18\x06 \x03(\x01\x12\x0b\n\x03max\x18\x05 \x01(\x01\x1a\x38\n\tTopNValue\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x12\r\n\x05ratio\x18\x03 \x01(\x01\x42\x0c\n\nfield_info\x1a\xfd\x02\n\x15PostScanActionsResult\x12{\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32V.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResultB\x03\xe0\x41\x03\x1a\xe6\x01\n\x14\x42igQueryExportResult\x12p\n\x05state\x18\x01 \x01(\x0e\x32\\.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.StateB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\x42l\n\x1c\x63om.google.cloud.dataplex.v1B\x10\x44\x61taProfileProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.dataplex.v1.ScannedData", "google/cloud/dataplex/v1/processing.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - DataProfileSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec").msgclass - DataProfileSpec::PostScanActions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.PostScanActions").msgclass - DataProfileSpec::PostScanActions::BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport").msgclass - DataProfileSpec::SelectedFields = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.SelectedFields").msgclass - DataProfileResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult").msgclass - DataProfileResult::Profile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile").msgclass - DataProfileResult::Profile::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field").msgclass - DataProfileResult::Profile::Field::ProfileInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo").msgclass - DataProfileResult::Profile::Field::ProfileInfo::StringFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo").msgclass - DataProfileResult::Profile::Field::ProfileInfo::IntegerFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo").msgclass - DataProfileResult::Profile::Field::ProfileInfo::DoubleFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo").msgclass - DataProfileResult::Profile::Field::ProfileInfo::TopNValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue").msgclass - DataProfileResult::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult").msgclass - DataProfileResult::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult").msgclass - DataProfileResult::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb deleted file mode 100644 index 57d9d4786491..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/data_quality.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/processing_pb' - - -descriptor_data = "\n+google/cloud/dataplex/v1/data_quality.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a)google/cloud/dataplex/v1/processing.proto\"\xc0\x08\n\x0f\x44\x61taQualitySpec\x12=\n\x05rules\x18\x01 \x03(\x0b\x32).google.cloud.dataplex.v1.DataQualityRuleB\x03\xe0\x41\x02\x12\x1d\n\x10sampling_percent\x18\x04 \x01(\x02\x42\x03\xe0\x41\x01\x12\x17\n\nrow_filter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12Y\n\x11post_scan_actions\x18\x06 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataQualitySpec.PostScanActionsB\x03\xe0\x41\x01\x1a\xda\x06\n\x0fPostScanActions\x12\x66\n\x0f\x62igquery_export\x18\x01 \x01(\x0b\x32H.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExportB\x03\xe0\x41\x01\x12n\n\x13notification_report\x18\x02 \x01(\x0b\x32L.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReportB\x03\xe0\x41\x01\x1a,\n\x0e\x42igQueryExport\x12\x1a\n\rresults_table\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a!\n\nRecipients\x12\x13\n\x06\x65mails\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a\x35\n\x15ScoreThresholdTrigger\x12\x1c\n\x0fscore_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x1a\x13\n\x11JobFailureTrigger\x1a\x0f\n\rJobEndTrigger\x1a\xc0\x03\n\x12NotificationReport\x12]\n\nrecipients\x18\x01 \x01(\x0b\x32\x44.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.RecipientsB\x03\xe0\x41\x02\x12u\n\x17score_threshold_trigger\x18\x02 \x01(\x0b\x32O.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTriggerB\x03\xe0\x41\x01\x12m\n\x13job_failure_trigger\x18\x04 \x01(\x0b\x32K.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTriggerB\x03\xe0\x41\x01\x12\x65\n\x0fjob_end_trigger\x18\x05 \x01(\x0b\x32G.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTriggerB\x03\xe0\x41\x01\"\xd3\x06\n\x11\x44\x61taQualityResult\x12\x0e\n\x06passed\x18\x05 \x01(\x08\x12\x17\n\x05score\x18\t \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12H\n\ndimensions\x18\x02 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.DataQualityDimensionResult\x12G\n\x07\x63olumns\x18\n \x03(\x0b\x32\x31.google.cloud.dataplex.v1.DataQualityColumnResultB\x03\xe0\x41\x03\x12>\n\x05rules\x18\x03 \x03(\x0b\x32/.google.cloud.dataplex.v1.DataQualityRuleResult\x12\x11\n\trow_count\x18\x04 \x01(\x03\x12;\n\x0cscanned_data\x18\x07 \x01(\x0b\x32%.google.cloud.dataplex.v1.ScannedData\x12h\n\x18post_scan_actions_result\x18\x08 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultB\x03\xe0\x41\x03\x1a\xfd\x02\n\x15PostScanActionsResult\x12{\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32V.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResultB\x03\xe0\x41\x03\x1a\xe6\x01\n\x14\x42igQueryExportResult\x12p\n\x05state\x18\x01 \x01(\x0e\x32\\.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.StateB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\x42\x08\n\x06_score\"\xf5\x01\n\x15\x44\x61taQualityRuleResult\x12\x37\n\x04rule\x18\x01 \x01(\x0b\x32).google.cloud.dataplex.v1.DataQualityRule\x12\x0e\n\x06passed\x18\x07 \x01(\x08\x12\x17\n\x0f\x65valuated_count\x18\t \x01(\x03\x12\x14\n\x0cpassed_count\x18\x08 \x01(\x03\x12\x12\n\nnull_count\x18\x05 \x01(\x03\x12\x12\n\npass_ratio\x18\x06 \x01(\x01\x12\x1a\n\x12\x66\x61iling_rows_query\x18\n \x01(\t\x12 \n\x13\x61ssertion_row_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\"\x97\x01\n\x1a\x44\x61taQualityDimensionResult\x12\x46\n\tdimension\x18\x01 \x01(\x0b\x32..google.cloud.dataplex.v1.DataQualityDimensionB\x03\xe0\x41\x03\x12\x0e\n\x06passed\x18\x03 \x01(\x08\x12\x17\n\x05score\x18\x04 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x08\n\x06_score\"$\n\x14\x44\x61taQualityDimension\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xf4\r\n\x0f\x44\x61taQualityRule\x12W\n\x11range_expectation\x18\x01 \x01(\x0b\x32:.google.cloud.dataplex.v1.DataQualityRule.RangeExpectationH\x00\x12\\\n\x14non_null_expectation\x18\x02 \x01(\x0b\x32<.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectationH\x00\x12S\n\x0fset_expectation\x18\x03 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataQualityRule.SetExpectationH\x00\x12W\n\x11regex_expectation\x18\x04 \x01(\x0b\x32:.google.cloud.dataplex.v1.DataQualityRule.RegexExpectationH\x00\x12\x61\n\x16uniqueness_expectation\x18\x64 \x01(\x0b\x32?.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectationH\x00\x12j\n\x1bstatistic_range_expectation\x18\x65 \x01(\x0b\x32\x43.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectationH\x00\x12g\n\x19row_condition_expectation\x18\xc8\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectationH\x00\x12k\n\x1btable_condition_expectation\x18\xc9\x01 \x01(\x0b\x32\x43.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectationH\x00\x12P\n\rsql_assertion\x18\xca\x01 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DataQualityRule.SqlAssertionH\x00\x12\x14\n\x06\x63olumn\x18\xf4\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0bignore_null\x18\xf5\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x17\n\tdimension\x18\xf6\x03 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\tthreshold\x18\xf7\x03 \x01(\x01\x42\x03\xe0\x41\x01\x12\x12\n\x04name\x18\xf8\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0b\x64\x65scription\x18\xf9\x03 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x01\n\x10RangeExpectation\x12\x16\n\tmin_value\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tmax_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12strict_min_enabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12strict_max_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x14\n\x12NonNullExpectation\x1a%\n\x0eSetExpectation\x12\x13\n\x06values\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a&\n\x10RegexExpectation\x12\x12\n\x05regex\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x17\n\x15UniquenessExpectation\x1a\xc2\x02\n\x19StatisticRangeExpectation\x12k\n\tstatistic\x18\x01 \x01(\x0e\x32S.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatisticB\x03\xe0\x41\x01\x12\x16\n\tmin_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tmax_value\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12strict_min_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1f\n\x12strict_max_enabled\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"F\n\x0f\x43olumnStatistic\x12\x17\n\x13STATISTIC_UNDEFINED\x10\x00\x12\x08\n\x04MEAN\x10\x01\x12\x07\n\x03MIN\x10\x02\x12\x07\n\x03MAX\x10\x03\x1a\x36\n\x17RowConditionExpectation\x12\x1b\n\x0esql_expression\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x38\n\x19TableConditionExpectation\x12\x1b\n\x0esql_expression\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a*\n\x0cSqlAssertion\x12\x1a\n\rsql_statement\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x0b\n\trule_type\"Q\n\x17\x44\x61taQualityColumnResult\x12\x13\n\x06\x63olumn\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\x05score\x18\x02 \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x08\n\x06_scoreB\xc4\x01\n\x1c\x63om.google.cloud.dataplex.v1B\x10\x44\x61taQualityProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.dataplex.v1.ScannedData", "google/cloud/dataplex/v1/processing.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - DataQualitySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec").msgclass - DataQualitySpec::PostScanActions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions").msgclass - DataQualitySpec::PostScanActions::BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport").msgclass - DataQualitySpec::PostScanActions::Recipients = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients").msgclass - DataQualitySpec::PostScanActions::ScoreThresholdTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger").msgclass - DataQualitySpec::PostScanActions::JobFailureTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger").msgclass - DataQualitySpec::PostScanActions::JobEndTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger").msgclass - DataQualitySpec::PostScanActions::NotificationReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport").msgclass - DataQualityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult").msgclass - DataQualityResult::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult").msgclass - DataQualityResult::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult").msgclass - DataQualityResult::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State").enummodule - DataQualityRuleResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRuleResult").msgclass - DataQualityDimensionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityDimensionResult").msgclass - DataQualityDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityDimension").msgclass - DataQualityRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule").msgclass - DataQualityRule::RangeExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RangeExpectation").msgclass - DataQualityRule::NonNullExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation").msgclass - DataQualityRule::SetExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.SetExpectation").msgclass - DataQualityRule::RegexExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RegexExpectation").msgclass - DataQualityRule::UniquenessExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation").msgclass - DataQualityRule::StatisticRangeExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation").msgclass - DataQualityRule::StatisticRangeExpectation::ColumnStatistic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic").enummodule - DataQualityRule::RowConditionExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation").msgclass - DataQualityRule::TableConditionExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation").msgclass - DataQualityRule::SqlAssertion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.SqlAssertion").msgclass - DataQualityColumnResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityColumnResult").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb deleted file mode 100644 index 9563fe840d55..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" - -require "google/cloud/dataplex/v1/data_scan_service/credentials" -require "google/cloud/dataplex/v1/data_scan_service/paths" -require "google/cloud/dataplex/v1/data_scan_service/operations" -require "google/cloud/dataplex/v1/data_scan_service/client" -require "google/cloud/dataplex/v1/data_scan_service/rest" - -module Google - module Cloud - module Dataplex - module 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. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1/data_scan_service" - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/dataplex/v1/data_scan_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - module DataScanService - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_scan_service", "helpers.rb" -require "google/cloud/dataplex/v1/data_scan_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb deleted file mode 100644 index eceda72aff4a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +++ /dev/null @@ -1,1329 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/datascans_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - ## - # Client for the DataScanService service. - # - # 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 Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_scan_service_stub - - ## - # Configure the DataScanService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataScanService clients - # ::Google::Cloud::Dataplex::V1::DataScanService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataScanService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_scan_service_stub.universe_domain - end - - ## - # Create a new DataScanService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataScanService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/dataplex/v1/datascans_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @data_scan_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dataplex::V1::DataScanService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_scan_service_stub.endpoint - config.universe_domain = @data_scan_service_stub.universe_domain - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_scan_service_stub.endpoint - config.universe_domain = @data_scan_service_stub.universe_domain - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataScanService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Creates a DataScan resource. - # - # @overload create_data_scan(request, options = nil) - # Pass arguments to `create_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_scan(parent: nil, data_scan: nil, data_scan_id: nil, validate_only: nil) - # Pass arguments to `create_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] - # Required. DataScan resource. - # @param data_scan_id [::String] - # 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 validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new - # - # # Call the create_data_scan method. - # result = client.create_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_data_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :create_data_scan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataScan resource. - # - # @overload update_data_scan(request, options = nil) - # Pass arguments to `update_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_scan(data_scan: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] - # Required. DataScan resource to be updated. - # - # Only fields specified in `update_mask` are updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new - # - # # Call the update_data_scan method. - # result = client.update_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_scan&.name - header_params["data_scan.name"] = request.data_scan.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :update_data_scan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataScan resource. - # - # @overload delete_data_scan(request, options = nil) - # Pass arguments to `delete_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_scan(name: nil) - # Pass arguments to `delete_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new - # - # # Call the delete_data_scan method. - # result = client.delete_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_data_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :delete_data_scan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a DataScan resource. - # - # @overload get_data_scan(request, options = nil) - # Pass arguments to `get_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_scan(name: nil, view: nil) - # Pass arguments to `get_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] - # Optional. Select the DataScan view to return. Defaults to `BASIC`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataScan] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new - # - # # Call the get_data_scan method. - # result = client.get_data_scan request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. - # p result - # - def get_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :get_data_scan, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataScans. - # - # @overload list_data_scans(request, options = nil) - # Pass arguments to `list_data_scans` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataScansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_scans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_scans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new - # - # # Call the list_data_scans method. - # result = client.list_data_scans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. - # p item - # end - # - def list_data_scans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScansRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_scans.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_scans.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_scans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :list_data_scans, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scans, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Runs an on-demand execution of a DataScan - # - # @overload run_data_scan(request, options = nil) - # Pass arguments to `run_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::RunDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_data_scan(name: nil) - # Pass arguments to `run_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new - # - # # Call the run_data_scan method. - # result = client.run_data_scan request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. - # p result - # - def run_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_data_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :run_data_scan, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a DataScanJob resource. - # - # @overload get_data_scan_job(request, options = nil) - # Pass arguments to `get_data_scan_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataScanJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_scan_job(name: nil, view: nil) - # Pass arguments to `get_data_scan_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] - # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataScanJob] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScanJob] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new - # - # # Call the get_data_scan_job method. - # result = client.get_data_scan_job request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. - # p result - # - def get_data_scan_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_scan_job.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_scan_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_scan_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :get_data_scan_job, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataScanJobs under the given DataScan. - # - # @overload list_data_scan_jobs(request, options = nil) - # Pass arguments to `list_data_scan_jobs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_scan_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_scan_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new - # - # # Call the list_data_scan_jobs method. - # result = client.list_data_scan_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. - # p item - # end - # - def list_data_scan_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_scan_jobs.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_scan_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_scan_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :list_data_scan_jobs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Generates recommended DataQualityRule from a data profiling DataScan. - # - # @overload generate_data_quality_rules(request, options = nil) - # Pass arguments to `generate_data_quality_rules` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload generate_data_quality_rules(name: nil) - # Pass arguments to `generate_data_quality_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name should be either - # * the name of a datascan with at least one successful completed data - # profiling job, or - # * the name of a successful completed data profiling datascan job. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new - # - # # Call the generate_data_quality_rules method. - # result = client.generate_data_quality_rules request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. - # p result - # - def generate_data_quality_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.generate_data_quality_rules.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.generate_data_quality_rules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_data_quality_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :generate_data_quality_rules, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataScanService API. - # - # This class represents the configuration for DataScanService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_data_scan to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataScanService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_scan.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_scan.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DataScanService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_scan - ## - # RPC-specific configuration for `update_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_scan - ## - # RPC-specific configuration for `delete_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_scan - ## - # RPC-specific configuration for `get_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_scan - ## - # RPC-specific configuration for `list_data_scans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_scans - ## - # RPC-specific configuration for `run_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :run_data_scan - ## - # RPC-specific configuration for `get_data_scan_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_scan_job - ## - # RPC-specific configuration for `list_data_scan_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_scan_jobs - ## - # RPC-specific configuration for `generate_data_quality_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_data_quality_rules - - # @private - def initialize parent_rpcs = nil - create_data_scan_config = parent_rpcs.create_data_scan if parent_rpcs.respond_to? :create_data_scan - @create_data_scan = ::Gapic::Config::Method.new create_data_scan_config - update_data_scan_config = parent_rpcs.update_data_scan if parent_rpcs.respond_to? :update_data_scan - @update_data_scan = ::Gapic::Config::Method.new update_data_scan_config - delete_data_scan_config = parent_rpcs.delete_data_scan if parent_rpcs.respond_to? :delete_data_scan - @delete_data_scan = ::Gapic::Config::Method.new delete_data_scan_config - get_data_scan_config = parent_rpcs.get_data_scan if parent_rpcs.respond_to? :get_data_scan - @get_data_scan = ::Gapic::Config::Method.new get_data_scan_config - list_data_scans_config = parent_rpcs.list_data_scans if parent_rpcs.respond_to? :list_data_scans - @list_data_scans = ::Gapic::Config::Method.new list_data_scans_config - run_data_scan_config = parent_rpcs.run_data_scan if parent_rpcs.respond_to? :run_data_scan - @run_data_scan = ::Gapic::Config::Method.new run_data_scan_config - get_data_scan_job_config = parent_rpcs.get_data_scan_job if parent_rpcs.respond_to? :get_data_scan_job - @get_data_scan_job = ::Gapic::Config::Method.new get_data_scan_job_config - list_data_scan_jobs_config = parent_rpcs.list_data_scan_jobs if parent_rpcs.respond_to? :list_data_scan_jobs - @list_data_scan_jobs = ::Gapic::Config::Method.new list_data_scan_jobs_config - generate_data_quality_rules_config = parent_rpcs.generate_data_quality_rules if parent_rpcs.respond_to? :generate_data_quality_rules - @generate_data_quality_rules = ::Gapic::Config::Method.new generate_data_quality_rules_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb deleted file mode 100644 index 51307cec4524..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - # Credentials for the DataScanService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb deleted file mode 100644 index 6d49b74e9b13..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb +++ /dev/null @@ -1,801 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DataScanService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataScanService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb deleted file mode 100644 index 1ba91d70b8d2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb +++ /dev/null @@ -1,113 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - # Path helper methods for the DataScanService API. - module Paths - ## - # Create a fully-qualified DataScan resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataScans/{dataScan}` - # - # @param project [String] - # @param location [String] - # @param dataScan [String] - # - # @return [::String] - def data_scan_path project:, location:, dataScan: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataScans/#{dataScan}" - end - - ## - # Create a fully-qualified DataScanJob resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}` - # - # @param project [String] - # @param location [String] - # @param dataScan [String] - # @param job [String] - # - # @return [::String] - def data_scan_job_path project:, location:, dataScan:, job: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataScan cannot contain /" if dataScan.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataScans/#{dataScan}/jobs/#{job}" - end - - ## - # Create a fully-qualified Entity resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # @param entity [String] - # - # @return [::String] - def entity_path project:, location:, lake:, zone:, entity: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb deleted file mode 100644 index bf498ab0f46b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/data_scan_service/credentials" -require "google/cloud/dataplex/v1/data_scan_service/paths" -require "google/cloud/dataplex/v1/data_scan_service/rest/operations" -require "google/cloud/dataplex/v1/data_scan_service/rest/client" - -module Google - module Cloud - module Dataplex - module 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. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/data_scan_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - module DataScanService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/data_scan_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb deleted file mode 100644 index 29318d468576..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +++ /dev/null @@ -1,1248 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/datascans_pb" -require "google/cloud/dataplex/v1/data_scan_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - module Rest - ## - # REST client for the DataScanService service. - # - # 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 Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_scan_service_stub - - ## - # Configure the DataScanService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataScanService clients - # ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataScanService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_scan_service_stub.universe_domain - end - - ## - # Create a new DataScanService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataScanService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @data_scan_service_stub = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_scan_service_stub.endpoint - config.universe_domain = @data_scan_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_scan_service_stub.endpoint - config.universe_domain = @data_scan_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataScanService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Creates a DataScan resource. - # - # @overload create_data_scan(request, options = nil) - # Pass arguments to `create_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_scan(parent: nil, data_scan: nil, data_scan_id: nil, validate_only: nil) - # Pass arguments to `create_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] - # Required. DataScan resource. - # @param data_scan_id [::String] - # 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 validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new - # - # # Call the create_data_scan method. - # result = client.create_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_data_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.create_data_scan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataScan resource. - # - # @overload update_data_scan(request, options = nil) - # Pass arguments to `update_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_scan(data_scan: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] - # Required. DataScan resource to be updated. - # - # Only fields specified in `update_mask` are updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new - # - # # Call the update_data_scan method. - # result = client.update_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.update_data_scan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataScan resource. - # - # @overload delete_data_scan(request, options = nil) - # Pass arguments to `delete_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_scan(name: nil) - # Pass arguments to `delete_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new - # - # # Call the delete_data_scan method. - # result = client.delete_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_data_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.delete_data_scan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a DataScan resource. - # - # @overload get_data_scan(request, options = nil) - # Pass arguments to `get_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_scan(name: nil, view: nil) - # Pass arguments to `get_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] - # Optional. Select the DataScan view to return. Defaults to `BASIC`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new - # - # # Call the get_data_scan method. - # result = client.get_data_scan request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. - # p result - # - def get_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.get_data_scan request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataScans. - # - # @overload list_data_scans(request, options = nil) - # Pass arguments to `list_data_scans` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataScansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_scans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_scans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScansResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataScansResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new - # - # # Call the list_data_scans method. - # result = client.list_data_scans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. - # p item - # end - # - def list_data_scans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScansRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_scans.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_scans.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_scans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.list_data_scans request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Runs an on-demand execution of a DataScan - # - # @overload run_data_scan(request, options = nil) - # Pass arguments to `run_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::RunDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_data_scan(name: nil) - # Pass arguments to `run_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new - # - # # Call the run_data_scan method. - # result = client.run_data_scan request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. - # p result - # - def run_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_data_scan.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.run_data_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.run_data_scan request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a DataScanJob resource. - # - # @overload get_data_scan_job(request, options = nil) - # Pass arguments to `get_data_scan_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataScanJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_scan_job(name: nil, view: nil) - # Pass arguments to `get_data_scan_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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 view [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] - # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScanJob] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScanJob] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new - # - # # Call the get_data_scan_job method. - # result = client.get_data_scan_job request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. - # p result - # - def get_data_scan_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_scan_job.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_scan_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_scan_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.get_data_scan_job request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataScanJobs under the given DataScan. - # - # @overload list_data_scan_jobs(request, options = nil) - # Pass arguments to `list_data_scan_jobs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_scan_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_scan_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new - # - # # Call the list_data_scan_jobs method. - # result = client.list_data_scan_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. - # p item - # end - # - def list_data_scan_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_scan_jobs.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_scan_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_scan_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.list_data_scan_jobs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, "data_scan_jobs", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Generates recommended DataQualityRule from a data profiling DataScan. - # - # @overload generate_data_quality_rules(request, options = nil) - # Pass arguments to `generate_data_quality_rules` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload generate_data_quality_rules(name: nil) - # Pass arguments to `generate_data_quality_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name should be either - # * the name of a datascan with at least one successful completed data - # profiling job, or - # * the name of a successful completed data profiling datascan job. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new - # - # # Call the generate_data_quality_rules method. - # result = client.generate_data_quality_rules request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. - # p result - # - def generate_data_quality_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.generate_data_quality_rules.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.generate_data_quality_rules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_data_quality_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.generate_data_quality_rules request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataScanService REST API. - # - # This class represents the configuration for DataScanService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_data_scan to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_scan.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_scan.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the DataScanService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_scan - ## - # RPC-specific configuration for `update_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_scan - ## - # RPC-specific configuration for `delete_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_scan - ## - # RPC-specific configuration for `get_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_scan - ## - # RPC-specific configuration for `list_data_scans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_scans - ## - # RPC-specific configuration for `run_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :run_data_scan - ## - # RPC-specific configuration for `get_data_scan_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_scan_job - ## - # RPC-specific configuration for `list_data_scan_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_scan_jobs - ## - # RPC-specific configuration for `generate_data_quality_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_data_quality_rules - - # @private - def initialize parent_rpcs = nil - create_data_scan_config = parent_rpcs.create_data_scan if parent_rpcs.respond_to? :create_data_scan - @create_data_scan = ::Gapic::Config::Method.new create_data_scan_config - update_data_scan_config = parent_rpcs.update_data_scan if parent_rpcs.respond_to? :update_data_scan - @update_data_scan = ::Gapic::Config::Method.new update_data_scan_config - delete_data_scan_config = parent_rpcs.delete_data_scan if parent_rpcs.respond_to? :delete_data_scan - @delete_data_scan = ::Gapic::Config::Method.new delete_data_scan_config - get_data_scan_config = parent_rpcs.get_data_scan if parent_rpcs.respond_to? :get_data_scan - @get_data_scan = ::Gapic::Config::Method.new get_data_scan_config - list_data_scans_config = parent_rpcs.list_data_scans if parent_rpcs.respond_to? :list_data_scans - @list_data_scans = ::Gapic::Config::Method.new list_data_scans_config - run_data_scan_config = parent_rpcs.run_data_scan if parent_rpcs.respond_to? :run_data_scan - @run_data_scan = ::Gapic::Config::Method.new run_data_scan_config - get_data_scan_job_config = parent_rpcs.get_data_scan_job if parent_rpcs.respond_to? :get_data_scan_job - @get_data_scan_job = ::Gapic::Config::Method.new get_data_scan_job_config - list_data_scan_jobs_config = parent_rpcs.list_data_scan_jobs if parent_rpcs.respond_to? :list_data_scan_jobs - @list_data_scan_jobs = ::Gapic::Config::Method.new list_data_scan_jobs_config - generate_data_quality_rules_config = parent_rpcs.generate_data_quality_rules if parent_rpcs.respond_to? :generate_data_quality_rules - @generate_data_quality_rules = ::Gapic::Config::Method.new generate_data_quality_rules_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb deleted file mode 100644 index 9c664a2eee4e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb +++ /dev/null @@ -1,895 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DataScanService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataScanService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb deleted file mode 100644 index 2ff5a60c134c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb +++ /dev/null @@ -1,612 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/datascans_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - module Rest - ## - # REST service stub for the DataScanService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the create_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # A result object deserialized from the server's reply - def get_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataScan.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_data_scans REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScansRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScansResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataScansResponse] - # A result object deserialized from the server's reply - def list_data_scans request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_scans_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the run_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::RunDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # A result object deserialized from the server's reply - def run_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_data_scan_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScanJob] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScanJob] - # A result object deserialized from the server's reply - def get_data_scan_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_scan_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataScanJob.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_data_scan_jobs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse] - # A result object deserialized from the server's reply - def list_data_scan_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_scan_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the generate_data_quality_rules REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # A result object deserialized from the server's reply - def generate_data_quality_rules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_data_quality_rules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataScans", - body: "data_scan", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_scan.name}", - body: "data_scan", - matches: [ - ["data_scan.name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_scans REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScansRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_scans_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataScans", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::RunDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:run", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_scan_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_scan_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_scan_jobs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_scan_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/jobs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_data_quality_rules REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_generate_data_quality_rules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:generateDataQualityRules", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:generateDataQualityRules", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb deleted file mode 100644 index 6d32d95fb76b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/data_taxonomy.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/security_pb' -require 'google/cloud/dataplex/v1/service_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/cloud/dataplex/v1/data_taxonomy.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/dataplex/v1/security.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x04\n\x0c\x44\x61taTaxonomy\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12G\n\x06labels\x18\x08 \x03(\x0b\x32\x32.google.cloud.dataplex.v1.DataTaxonomy.LabelsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0f\x61ttribute_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\n \x01(\t\x12\x18\n\x0b\x63lass_count\x18\x0b \x01(\x05\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n$dataplex.googleapis.com/DataTaxonomy\x12Iprojects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}\"\x94\x06\n\rDataAttribute\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12H\n\x06labels\x18\x07 \x03(\x0b\x32\x33.google.cloud.dataplex.v1.DataAttribute.LabelsEntryB\x03\xe0\x41\x01\x12@\n\tparent_id\x18\x08 \x01(\tB-\xe0\x41\x01\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12\x1c\n\x0f\x61ttribute_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\n \x01(\t\x12O\n\x14resource_access_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.ResourceAccessSpecB\x03\xe0\x41\x01\x12G\n\x10\x64\x61ta_access_spec\x18\x65 \x01(\x0b\x32(.google.cloud.dataplex.v1.DataAccessSpecB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x91\x01\xea\x41\x8d\x01\n%dataplex.googleapis.com/DataAttribute\x12\x64projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}\"\xc7\x06\n\x14\x44\x61taAttributeBinding\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x03\xfa\x41.\n,dataplex.googleapis.com/DataAttributeBinding\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12O\n\x06labels\x18\x07 \x03(\x0b\x32:.google.cloud.dataplex.v1.DataAttributeBinding.LabelsEntryB\x03\xe0\x41\x01\x12\x0c\n\x04\x65tag\x18\x08 \x01(\t\x12\x1a\n\x08resource\x18\x64 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x41\n\nattributes\x18n \x03(\tB-\xe0\x41\x01\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12G\n\x05paths\x18x \x03(\x0b\x32\x33.google.cloud.dataplex.v1.DataAttributeBinding.PathB\x03\xe0\x41\x01\x1a\\\n\x04Path\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\nattributes\x18\x02 \x03(\tB-\xe0\x41\x01\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8d\x01\xea\x41\x89\x01\n,dataplex.googleapis.com/DataAttributeBinding\x12Yprojects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}B\x14\n\x12resource_reference\"\xd5\x01\n\x19\x43reateDataTaxonomyRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1d\n\x10\x64\x61ta_taxonomy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\rdata_taxonomy\x18\x03 \x01(\x0b\x32&.google.cloud.dataplex.v1.DataTaxonomyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n\x19UpdateDataTaxonomyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x42\n\rdata_taxonomy\x18\x02 \x01(\x0b\x32&.google.cloud.dataplex.v1.DataTaxonomyB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"T\n\x16GetDataTaxonomyRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\"\xb3\x01\n\x19ListDataTaxonomiesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x95\x01\n\x1aListDataTaxonomiesResponse\x12?\n\x0f\x64\x61ta_taxonomies\x18\x01 \x03(\x0b\x32&.google.cloud.dataplex.v1.DataTaxonomy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"j\n\x19\x44\x65leteDataTaxonomyRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xdc\x01\n\x1a\x43reateDataAttributeRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x1e\n\x11\x64\x61ta_attribute_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x0e\x64\x61ta_attribute\x18\x03 \x01(\x0b\x32\'.google.cloud.dataplex.v1.DataAttributeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xb4\x01\n\x1aUpdateDataAttributeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x44\n\x0e\x64\x61ta_attribute\x18\x02 \x01(\x0b\x32\'.google.cloud.dataplex.v1.DataAttributeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"V\n\x17GetDataAttributeRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\"\xb6\x01\n\x19ListDataAttributesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1aListDataAttributesResponse\x12@\n\x0f\x64\x61ta_attributes\x18\x01 \x03(\x0b\x32\'.google.cloud.dataplex.v1.DataAttribute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"l\n\x1a\x44\x65leteDataAttributeRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dataplex.googleapis.com/DataAttribute\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xf7\x01\n!CreateDataAttributeBindingRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12&\n\x19\x64\x61ta_attribute_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12S\n\x16\x64\x61ta_attribute_binding\x18\x03 \x01(\x0b\x32..google.cloud.dataplex.v1.DataAttributeBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xca\x01\n!UpdateDataAttributeBindingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12S\n\x16\x64\x61ta_attribute_binding\x18\x02 \x01(\x0b\x32..google.cloud.dataplex.v1.DataAttributeBindingB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"d\n\x1eGetDataAttributeBindingRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,dataplex.googleapis.com/DataAttributeBinding\"\xba\x01\n ListDataAttributeBindingsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n!ListDataAttributeBindingsResponse\x12O\n\x17\x64\x61ta_attribute_bindings\x18\x01 \x03(\x0b\x32..google.cloud.dataplex.v1.DataAttributeBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"z\n!DeleteDataAttributeBindingRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,dataplex.googleapis.com/DataAttributeBinding\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\x32\x8b\x1d\n\x13\x44\x61taTaxonomyService\x12\x80\x02\n\x12\x43reateDataTaxonomy\x12\x33.google.cloud.dataplex.v1.CreateDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41!\n\x0c\x44\x61taTaxonomy\x12\x11OperationMetadata\xda\x41%parent,data_taxonomy,data_taxonomy_id\x82\xd3\xe4\x93\x02\x43\"2/v1/{parent=projects/*/locations/*}/dataTaxonomies:\rdata_taxonomy\x12\x82\x02\n\x12UpdateDataTaxonomy\x12\x33.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"\x97\x01\xca\x41!\n\x0c\x44\x61taTaxonomy\x12\x11OperationMetadata\xda\x41\x19\x64\x61ta_taxonomy,update_mask\x82\xd3\xe4\x93\x02Q2@/v1/{data_taxonomy.name=projects/*/locations/*/dataTaxonomies/*}:\rdata_taxonomy\x12\xd8\x01\n\x12\x44\x65leteDataTaxonomy\x12\x33.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/dataTaxonomies/*}\x12\xc4\x01\n\x12ListDataTaxonomies\x12\x33.google.cloud.dataplex.v1.ListDataTaxonomiesRequest\x1a\x34.google.cloud.dataplex.v1.ListDataTaxonomiesResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/dataTaxonomies\x12\xae\x01\n\x0fGetDataTaxonomy\x12\x30.google.cloud.dataplex.v1.GetDataTaxonomyRequest\x1a&.google.cloud.dataplex.v1.DataTaxonomy\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/dataTaxonomies/*}\x12\xba\x02\n\x1a\x43reateDataAttributeBinding\x12;.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41)\n\x14\x44\x61taAttributeBinding\x12\x11OperationMetadata\xda\x41\x37parent,data_attribute_binding,data_attribute_binding_id\x82\xd3\xe4\x93\x02S\"9/v1/{parent=projects/*/locations/*}/dataAttributeBindings:\x16\x64\x61ta_attribute_binding\x12\xbc\x02\n\x1aUpdateDataAttributeBinding\x12;.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41)\n\x14\x44\x61taAttributeBinding\x12\x11OperationMetadata\xda\x41\"data_attribute_binding,update_mask\x82\xd3\xe4\x93\x02j2P/v1/{data_attribute_binding.name=projects/*/locations/*/dataAttributeBindings/*}:\x16\x64\x61ta_attribute_binding\x12\xef\x01\n\x1a\x44\x65leteDataAttributeBinding\x12;.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/dataAttributeBindings/*}\x12\xe0\x01\n\x19ListDataAttributeBindings\x12:.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest\x1a;.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*}/dataAttributeBindings\x12\xcd\x01\n\x17GetDataAttributeBinding\x12\x38.google.cloud.dataplex.v1.GetDataAttributeBindingRequest\x1a..google.cloud.dataplex.v1.DataAttributeBinding\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/dataAttributeBindings/*}\x12\x93\x02\n\x13\x43reateDataAttribute\x12\x34.google.cloud.dataplex.v1.CreateDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41\"\n\rDataAttribute\x12\x11OperationMetadata\xda\x41\'parent,data_attribute,data_attribute_id\x82\xd3\xe4\x93\x02Q\"?/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes:\x0e\x64\x61ta_attribute\x12\x95\x02\n\x13UpdateDataAttribute\x12\x34.google.cloud.dataplex.v1.UpdateDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41\"\n\rDataAttribute\x12\x11OperationMetadata\xda\x41\x1a\x64\x61ta_attribute,update_mask\x82\xd3\xe4\x93\x02`2N/v1/{data_attribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}:\x0e\x64\x61ta_attribute\x12\xe7\x01\n\x13\x44\x65leteDataAttribute\x12\x34.google.cloud.dataplex.v1.DeleteDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}\x12\xd1\x01\n\x12ListDataAttributes\x12\x33.google.cloud.dataplex.v1.ListDataAttributesRequest\x1a\x34.google.cloud.dataplex.v1.ListDataAttributesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes\x12\xbe\x01\n\x10GetDataAttribute\x12\x31.google.cloud.dataplex.v1.GetDataAttributeRequest\x1a\'.google.cloud.dataplex.v1.DataAttribute\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBm\n\x1c\x63om.google.cloud.dataplex.v1B\x11\x44\x61taTaxonomyProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.dataplex.v1.ResourceAccessSpec", "google/cloud/dataplex/v1/security.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - DataTaxonomy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataTaxonomy").msgclass - DataAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttribute").msgclass - DataAttributeBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttributeBinding").msgclass - DataAttributeBinding::Path = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttributeBinding.Path").msgclass - CreateDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataTaxonomyRequest").msgclass - UpdateDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataTaxonomyRequest").msgclass - GetDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataTaxonomyRequest").msgclass - ListDataTaxonomiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataTaxonomiesRequest").msgclass - ListDataTaxonomiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataTaxonomiesResponse").msgclass - DeleteDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataTaxonomyRequest").msgclass - CreateDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataAttributeRequest").msgclass - UpdateDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataAttributeRequest").msgclass - GetDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataAttributeRequest").msgclass - ListDataAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributesRequest").msgclass - ListDataAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributesResponse").msgclass - DeleteDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataAttributeRequest").msgclass - CreateDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataAttributeBindingRequest").msgclass - UpdateDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest").msgclass - GetDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataAttributeBindingRequest").msgclass - ListDataAttributeBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributeBindingsRequest").msgclass - ListDataAttributeBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributeBindingsResponse").msgclass - DeleteDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb deleted file mode 100644 index 12feb1928fc2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" - -require "google/cloud/dataplex/v1/data_taxonomy_service/credentials" -require "google/cloud/dataplex/v1/data_taxonomy_service/paths" -require "google/cloud/dataplex/v1/data_taxonomy_service/operations" -require "google/cloud/dataplex/v1/data_taxonomy_service/client" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest" - -module Google - module Cloud - module Dataplex - module V1 - ## - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1/data_taxonomy_service" - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/dataplex/v1/data_taxonomy_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - module DataTaxonomyService - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_taxonomy_service", "helpers.rb" -require "google/cloud/dataplex/v1/data_taxonomy_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb deleted file mode 100644 index c516748b8f4e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +++ /dev/null @@ -1,1966 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/data_taxonomy_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - ## - # Client for the DataTaxonomyService service. - # - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - # - class Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_taxonomy_service_stub - - ## - # Configure the DataTaxonomyService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataTaxonomyService clients - # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTaxonomyService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_taxonomy_service_stub.universe_domain - end - - ## - # Create a new DataTaxonomyService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataTaxonomyService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/dataplex/v1/data_taxonomy_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @data_taxonomy_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_taxonomy_service_stub.endpoint - config.universe_domain = @data_taxonomy_service_stub.universe_domain - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_taxonomy_service_stub.endpoint - config.universe_domain = @data_taxonomy_service_stub.universe_domain - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Create a DataTaxonomy resource. - # - # @overload create_data_taxonomy(request, options = nil) - # Pass arguments to `create_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_taxonomy(parent: nil, data_taxonomy_id: nil, data_taxonomy: nil, validate_only: nil) - # Pass arguments to `create_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 data_taxonomy_id [::String] - # 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 data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] - # Required. DataTaxonomy resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new - # - # # Call the create_data_taxonomy method. - # result = client.create_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_data_taxonomy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :create_data_taxonomy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataTaxonomy resource. - # - # @overload update_data_taxonomy(request, options = nil) - # Pass arguments to `update_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_taxonomy(update_mask: nil, data_taxonomy: nil, validate_only: nil) - # Pass arguments to `update_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new - # - # # Call the update_data_taxonomy method. - # result = client.update_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_taxonomy&.name - header_params["data_taxonomy.name"] = request.data_taxonomy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_taxonomy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :update_data_taxonomy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - # must be deleted before the DataTaxonomy can be deleted. - # - # @overload delete_data_taxonomy(request, options = nil) - # Pass arguments to `delete_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_taxonomy(name: nil, etag: nil) - # Pass arguments to `delete_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value,the DeleteDataTaxonomy method returns an ABORTED error. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new - # - # # Call the delete_data_taxonomy method. - # result = client.delete_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_data_taxonomy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :delete_data_taxonomy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataTaxonomy resources in a project and location. - # - # @overload list_data_taxonomies(request, options = nil) - # Pass arguments to `list_data_taxonomies` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_taxonomies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new - # - # # Call the list_data_taxonomies method. - # result = client.list_data_taxonomies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. - # p item - # end - # - def list_data_taxonomies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_taxonomies.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_taxonomies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_taxonomies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :list_data_taxonomies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_taxonomies, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a DataTaxonomy resource. - # - # @overload get_data_taxonomy(request, options = nil) - # Pass arguments to `get_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_taxonomy(name: nil) - # Pass arguments to `get_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new - # - # # Call the get_data_taxonomy method. - # result = client.get_data_taxonomy request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. - # p result - # - def get_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_taxonomy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :get_data_taxonomy, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a DataAttributeBinding resource. - # - # @overload create_data_attribute_binding(request, options = nil) - # Pass arguments to `create_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_attribute_binding(parent: nil, data_attribute_binding_id: nil, data_attribute_binding: nil, validate_only: nil) - # Pass arguments to `create_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id} - # @param data_attribute_binding_id [::String] - # 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 data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] - # Required. DataAttributeBinding resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new - # - # # Call the create_data_attribute_binding method. - # result = client.create_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_data_attribute_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :create_data_attribute_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataAttributeBinding resource. - # - # @overload update_data_attribute_binding(request, options = nil) - # Pass arguments to `update_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_attribute_binding(update_mask: nil, data_attribute_binding: nil, validate_only: nil) - # Pass arguments to `update_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new - # - # # Call the update_data_attribute_binding method. - # result = client.update_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_attribute_binding&.name - header_params["data_attribute_binding.name"] = request.data_attribute_binding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_attribute_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :update_data_attribute_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataAttributeBinding resource. All attributes within the - # DataAttributeBinding must be deleted before the DataAttributeBinding can be - # deleted. - # - # @overload delete_data_attribute_binding(request, options = nil) - # Pass arguments to `delete_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_attribute_binding(name: nil, etag: nil) - # Pass arguments to `delete_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # @param etag [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new - # - # # Call the delete_data_attribute_binding method. - # result = client.delete_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_data_attribute_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :delete_data_attribute_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataAttributeBinding resources in a project and location. - # - # @overload list_data_attribute_bindings(request, options = nil) - # Pass arguments to `list_data_attribute_bindings` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_attribute_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_attribute_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the Location: - # projects/\\{project_number}/locations/\\{location_id} - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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 order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new - # - # # Call the list_data_attribute_bindings method. - # result = client.list_data_attribute_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. - # p item - # end - # - def list_data_attribute_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_attribute_bindings.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_attribute_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_attribute_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :list_data_attribute_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attribute_bindings, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a DataAttributeBinding resource. - # - # @overload get_data_attribute_binding(request, options = nil) - # Pass arguments to `get_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_attribute_binding(name: nil) - # Pass arguments to `get_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new - # - # # Call the get_data_attribute_binding method. - # result = client.get_data_attribute_binding request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. - # p result - # - def get_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_attribute_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :get_data_attribute_binding, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a DataAttribute resource. - # - # @overload create_data_attribute(request, options = nil) - # Pass arguments to `create_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_attribute(parent: nil, data_attribute_id: nil, data_attribute: nil, validate_only: nil) - # Pass arguments to `create_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param data_attribute_id [::String] - # 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 data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] - # Required. DataAttribute resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new - # - # # Call the create_data_attribute method. - # result = client.create_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_data_attribute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :create_data_attribute, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataAttribute resource. - # - # @overload update_data_attribute(request, options = nil) - # Pass arguments to `update_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_attribute(update_mask: nil, data_attribute: nil, validate_only: nil) - # Pass arguments to `update_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new - # - # # Call the update_data_attribute method. - # result = client.update_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_attribute&.name - header_params["data_attribute.name"] = request.data_attribute.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_attribute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :update_data_attribute, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Data Attribute resource. - # - # @overload delete_data_attribute(request, options = nil) - # Pass arguments to `delete_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_attribute(name: nil, etag: nil) - # Pass arguments to `delete_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteDataAttribute method returns an ABORTED error response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new - # - # # Call the delete_data_attribute method. - # result = client.delete_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_data_attribute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :delete_data_attribute, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Data Attribute resources in a DataTaxonomy. - # - # @overload list_data_attributes(request, options = nil) - # Pass arguments to `list_data_attributes` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataAttributesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_attributes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_attributes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new - # - # # Call the list_data_attributes method. - # result = client.list_data_attributes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. - # p item - # end - # - def list_data_attributes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_attributes.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_attributes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_attributes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :list_data_attributes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attributes, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a Data Attribute resource. - # - # @overload get_data_attribute(request, options = nil) - # Pass arguments to `get_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_attribute(name: nil) - # Pass arguments to `get_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataAttribute] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new - # - # # Call the get_data_attribute method. - # result = client.get_data_attribute request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. - # p result - # - def get_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_attribute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :get_data_attribute, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataTaxonomyService API. - # - # This class represents the configuration for DataTaxonomyService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_data_taxonomy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_taxonomy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_taxonomy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DataTaxonomyService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_taxonomy - ## - # RPC-specific configuration for `update_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_taxonomy - ## - # RPC-specific configuration for `delete_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_taxonomy - ## - # RPC-specific configuration for `list_data_taxonomies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_taxonomies - ## - # RPC-specific configuration for `get_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_taxonomy - ## - # RPC-specific configuration for `create_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_attribute_binding - ## - # RPC-specific configuration for `update_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_attribute_binding - ## - # RPC-specific configuration for `delete_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_attribute_binding - ## - # RPC-specific configuration for `list_data_attribute_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_attribute_bindings - ## - # RPC-specific configuration for `get_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_attribute_binding - ## - # RPC-specific configuration for `create_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_attribute - ## - # RPC-specific configuration for `update_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_attribute - ## - # RPC-specific configuration for `delete_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_attribute - ## - # RPC-specific configuration for `list_data_attributes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_attributes - ## - # RPC-specific configuration for `get_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_attribute - - # @private - def initialize parent_rpcs = nil - create_data_taxonomy_config = parent_rpcs.create_data_taxonomy if parent_rpcs.respond_to? :create_data_taxonomy - @create_data_taxonomy = ::Gapic::Config::Method.new create_data_taxonomy_config - update_data_taxonomy_config = parent_rpcs.update_data_taxonomy if parent_rpcs.respond_to? :update_data_taxonomy - @update_data_taxonomy = ::Gapic::Config::Method.new update_data_taxonomy_config - delete_data_taxonomy_config = parent_rpcs.delete_data_taxonomy if parent_rpcs.respond_to? :delete_data_taxonomy - @delete_data_taxonomy = ::Gapic::Config::Method.new delete_data_taxonomy_config - list_data_taxonomies_config = parent_rpcs.list_data_taxonomies if parent_rpcs.respond_to? :list_data_taxonomies - @list_data_taxonomies = ::Gapic::Config::Method.new list_data_taxonomies_config - get_data_taxonomy_config = parent_rpcs.get_data_taxonomy if parent_rpcs.respond_to? :get_data_taxonomy - @get_data_taxonomy = ::Gapic::Config::Method.new get_data_taxonomy_config - create_data_attribute_binding_config = parent_rpcs.create_data_attribute_binding if parent_rpcs.respond_to? :create_data_attribute_binding - @create_data_attribute_binding = ::Gapic::Config::Method.new create_data_attribute_binding_config - update_data_attribute_binding_config = parent_rpcs.update_data_attribute_binding if parent_rpcs.respond_to? :update_data_attribute_binding - @update_data_attribute_binding = ::Gapic::Config::Method.new update_data_attribute_binding_config - delete_data_attribute_binding_config = parent_rpcs.delete_data_attribute_binding if parent_rpcs.respond_to? :delete_data_attribute_binding - @delete_data_attribute_binding = ::Gapic::Config::Method.new delete_data_attribute_binding_config - list_data_attribute_bindings_config = parent_rpcs.list_data_attribute_bindings if parent_rpcs.respond_to? :list_data_attribute_bindings - @list_data_attribute_bindings = ::Gapic::Config::Method.new list_data_attribute_bindings_config - get_data_attribute_binding_config = parent_rpcs.get_data_attribute_binding if parent_rpcs.respond_to? :get_data_attribute_binding - @get_data_attribute_binding = ::Gapic::Config::Method.new get_data_attribute_binding_config - create_data_attribute_config = parent_rpcs.create_data_attribute if parent_rpcs.respond_to? :create_data_attribute - @create_data_attribute = ::Gapic::Config::Method.new create_data_attribute_config - update_data_attribute_config = parent_rpcs.update_data_attribute if parent_rpcs.respond_to? :update_data_attribute - @update_data_attribute = ::Gapic::Config::Method.new update_data_attribute_config - delete_data_attribute_config = parent_rpcs.delete_data_attribute if parent_rpcs.respond_to? :delete_data_attribute - @delete_data_attribute = ::Gapic::Config::Method.new delete_data_attribute_config - list_data_attributes_config = parent_rpcs.list_data_attributes if parent_rpcs.respond_to? :list_data_attributes - @list_data_attributes = ::Gapic::Config::Method.new list_data_attributes_config - get_data_attribute_config = parent_rpcs.get_data_attribute if parent_rpcs.respond_to? :get_data_attribute - @get_data_attribute = ::Gapic::Config::Method.new get_data_attribute_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb deleted file mode 100644 index 58c35cc846da..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - # Credentials for the DataTaxonomyService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb deleted file mode 100644 index 4d0a0a769ebd..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb +++ /dev/null @@ -1,801 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DataTaxonomyService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTaxonomyService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb deleted file mode 100644 index 24ff999c274b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb +++ /dev/null @@ -1,109 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - # Path helper methods for the DataTaxonomyService API. - module Paths - ## - # Create a fully-qualified DataAttribute resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}` - # - # @param project [String] - # @param location [String] - # @param dataTaxonomy [String] - # @param data_attribute_id [String] - # - # @return [::String] - def data_attribute_path project:, location:, dataTaxonomy:, data_attribute_id: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataTaxonomy cannot contain /" if dataTaxonomy.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataTaxonomies/#{dataTaxonomy}/attributes/#{data_attribute_id}" - end - - ## - # Create a fully-qualified DataAttributeBinding resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}` - # - # @param project [String] - # @param location [String] - # @param data_attribute_binding_id [String] - # - # @return [::String] - def data_attribute_binding_path project:, location:, data_attribute_binding_id: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataAttributeBindings/#{data_attribute_binding_id}" - end - - ## - # Create a fully-qualified DataTaxonomy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}` - # - # @param project [String] - # @param location [String] - # @param data_taxonomy_id [String] - # - # @return [::String] - def data_taxonomy_path project:, location:, data_taxonomy_id: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataTaxonomies/#{data_taxonomy_id}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb deleted file mode 100644 index 9662b3d8beed..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/data_taxonomy_service/credentials" -require "google/cloud/dataplex/v1/data_taxonomy_service/paths" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest/operations" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/data_taxonomy_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - module DataTaxonomyService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb deleted file mode 100644 index ee63c2241640..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb +++ /dev/null @@ -1,1841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/data_taxonomy_pb" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - module Rest - ## - # REST client for the DataTaxonomyService service. - # - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - # - class Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_taxonomy_service_stub - - ## - # Configure the DataTaxonomyService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataTaxonomyService clients - # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTaxonomyService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_taxonomy_service_stub.universe_domain - end - - ## - # Create a new DataTaxonomyService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataTaxonomyService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @data_taxonomy_service_stub = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_taxonomy_service_stub.endpoint - config.universe_domain = @data_taxonomy_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_taxonomy_service_stub.endpoint - config.universe_domain = @data_taxonomy_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Create a DataTaxonomy resource. - # - # @overload create_data_taxonomy(request, options = nil) - # Pass arguments to `create_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_taxonomy(parent: nil, data_taxonomy_id: nil, data_taxonomy: nil, validate_only: nil) - # Pass arguments to `create_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 data_taxonomy_id [::String] - # 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 data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] - # Required. DataTaxonomy resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new - # - # # Call the create_data_taxonomy method. - # result = client.create_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_data_taxonomy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.create_data_taxonomy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataTaxonomy resource. - # - # @overload update_data_taxonomy(request, options = nil) - # Pass arguments to `update_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_taxonomy(update_mask: nil, data_taxonomy: nil, validate_only: nil) - # Pass arguments to `update_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new - # - # # Call the update_data_taxonomy method. - # result = client.update_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_taxonomy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.update_data_taxonomy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - # must be deleted before the DataTaxonomy can be deleted. - # - # @overload delete_data_taxonomy(request, options = nil) - # Pass arguments to `delete_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_taxonomy(name: nil, etag: nil) - # Pass arguments to `delete_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value,the DeleteDataTaxonomy method returns an ABORTED error. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new - # - # # Call the delete_data_taxonomy method. - # result = client.delete_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_data_taxonomy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.delete_data_taxonomy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataTaxonomy resources in a project and location. - # - # @overload list_data_taxonomies(request, options = nil) - # Pass arguments to `list_data_taxonomies` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_taxonomies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new - # - # # Call the list_data_taxonomies method. - # result = client.list_data_taxonomies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. - # p item - # end - # - def list_data_taxonomies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_taxonomies.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_taxonomies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_taxonomies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.list_data_taxonomies request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a DataTaxonomy resource. - # - # @overload get_data_taxonomy(request, options = nil) - # Pass arguments to `get_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_taxonomy(name: nil) - # Pass arguments to `get_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new - # - # # Call the get_data_taxonomy method. - # result = client.get_data_taxonomy request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. - # p result - # - def get_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_taxonomy.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_taxonomy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.get_data_taxonomy request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a DataAttributeBinding resource. - # - # @overload create_data_attribute_binding(request, options = nil) - # Pass arguments to `create_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_attribute_binding(parent: nil, data_attribute_binding_id: nil, data_attribute_binding: nil, validate_only: nil) - # Pass arguments to `create_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id} - # @param data_attribute_binding_id [::String] - # 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 data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] - # Required. DataAttributeBinding resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new - # - # # Call the create_data_attribute_binding method. - # result = client.create_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_data_attribute_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.create_data_attribute_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataAttributeBinding resource. - # - # @overload update_data_attribute_binding(request, options = nil) - # Pass arguments to `update_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_attribute_binding(update_mask: nil, data_attribute_binding: nil, validate_only: nil) - # Pass arguments to `update_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new - # - # # Call the update_data_attribute_binding method. - # result = client.update_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_attribute_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.update_data_attribute_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataAttributeBinding resource. All attributes within the - # DataAttributeBinding must be deleted before the DataAttributeBinding can be - # deleted. - # - # @overload delete_data_attribute_binding(request, options = nil) - # Pass arguments to `delete_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_attribute_binding(name: nil, etag: nil) - # Pass arguments to `delete_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # @param etag [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new - # - # # Call the delete_data_attribute_binding method. - # result = client.delete_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_data_attribute_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.delete_data_attribute_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataAttributeBinding resources in a project and location. - # - # @overload list_data_attribute_bindings(request, options = nil) - # Pass arguments to `list_data_attribute_bindings` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_attribute_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_attribute_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the Location: - # projects/\\{project_number}/locations/\\{location_id} - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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 order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new - # - # # Call the list_data_attribute_bindings method. - # result = client.list_data_attribute_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. - # p item - # end - # - def list_data_attribute_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_attribute_bindings.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_attribute_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_attribute_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.list_data_attribute_bindings request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a DataAttributeBinding resource. - # - # @overload get_data_attribute_binding(request, options = nil) - # Pass arguments to `get_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_attribute_binding(name: nil) - # Pass arguments to `get_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new - # - # # Call the get_data_attribute_binding method. - # result = client.get_data_attribute_binding request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. - # p result - # - def get_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_attribute_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.get_data_attribute_binding request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a DataAttribute resource. - # - # @overload create_data_attribute(request, options = nil) - # Pass arguments to `create_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_attribute(parent: nil, data_attribute_id: nil, data_attribute: nil, validate_only: nil) - # Pass arguments to `create_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param data_attribute_id [::String] - # 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 data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] - # Required. DataAttribute resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new - # - # # Call the create_data_attribute method. - # result = client.create_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_data_attribute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.create_data_attribute request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataAttribute resource. - # - # @overload update_data_attribute(request, options = nil) - # Pass arguments to `update_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_attribute(update_mask: nil, data_attribute: nil, validate_only: nil) - # Pass arguments to `update_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new - # - # # Call the update_data_attribute method. - # result = client.update_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_data_attribute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.update_data_attribute request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Data Attribute resource. - # - # @overload delete_data_attribute(request, options = nil) - # Pass arguments to `delete_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_attribute(name: nil, etag: nil) - # Pass arguments to `delete_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteDataAttribute method returns an ABORTED error response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new - # - # # Call the delete_data_attribute method. - # result = client.delete_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_data_attribute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.delete_data_attribute request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Data Attribute resources in a DataTaxonomy. - # - # @overload list_data_attributes(request, options = nil) - # Pass arguments to `list_data_attributes` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataAttributesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_attributes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_attributes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new - # - # # Call the list_data_attributes method. - # result = client.list_data_attributes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. - # p item - # end - # - def list_data_attributes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_attributes.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_data_attributes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_attributes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.list_data_attributes request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a Data Attribute resource. - # - # @overload get_data_attribute(request, options = nil) - # Pass arguments to `get_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_attribute(name: nil) - # Pass arguments to `get_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttribute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new - # - # # Call the get_data_attribute method. - # result = client.get_data_attribute request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. - # p result - # - def get_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_attribute.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_data_attribute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.get_data_attribute request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataTaxonomyService REST API. - # - # This class represents the configuration for DataTaxonomyService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_data_taxonomy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_taxonomy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_taxonomy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the DataTaxonomyService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_taxonomy - ## - # RPC-specific configuration for `update_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_taxonomy - ## - # RPC-specific configuration for `delete_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_taxonomy - ## - # RPC-specific configuration for `list_data_taxonomies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_taxonomies - ## - # RPC-specific configuration for `get_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_taxonomy - ## - # RPC-specific configuration for `create_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_attribute_binding - ## - # RPC-specific configuration for `update_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_attribute_binding - ## - # RPC-specific configuration for `delete_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_attribute_binding - ## - # RPC-specific configuration for `list_data_attribute_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_attribute_bindings - ## - # RPC-specific configuration for `get_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_attribute_binding - ## - # RPC-specific configuration for `create_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_attribute - ## - # RPC-specific configuration for `update_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_attribute - ## - # RPC-specific configuration for `delete_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_attribute - ## - # RPC-specific configuration for `list_data_attributes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_attributes - ## - # RPC-specific configuration for `get_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_attribute - - # @private - def initialize parent_rpcs = nil - create_data_taxonomy_config = parent_rpcs.create_data_taxonomy if parent_rpcs.respond_to? :create_data_taxonomy - @create_data_taxonomy = ::Gapic::Config::Method.new create_data_taxonomy_config - update_data_taxonomy_config = parent_rpcs.update_data_taxonomy if parent_rpcs.respond_to? :update_data_taxonomy - @update_data_taxonomy = ::Gapic::Config::Method.new update_data_taxonomy_config - delete_data_taxonomy_config = parent_rpcs.delete_data_taxonomy if parent_rpcs.respond_to? :delete_data_taxonomy - @delete_data_taxonomy = ::Gapic::Config::Method.new delete_data_taxonomy_config - list_data_taxonomies_config = parent_rpcs.list_data_taxonomies if parent_rpcs.respond_to? :list_data_taxonomies - @list_data_taxonomies = ::Gapic::Config::Method.new list_data_taxonomies_config - get_data_taxonomy_config = parent_rpcs.get_data_taxonomy if parent_rpcs.respond_to? :get_data_taxonomy - @get_data_taxonomy = ::Gapic::Config::Method.new get_data_taxonomy_config - create_data_attribute_binding_config = parent_rpcs.create_data_attribute_binding if parent_rpcs.respond_to? :create_data_attribute_binding - @create_data_attribute_binding = ::Gapic::Config::Method.new create_data_attribute_binding_config - update_data_attribute_binding_config = parent_rpcs.update_data_attribute_binding if parent_rpcs.respond_to? :update_data_attribute_binding - @update_data_attribute_binding = ::Gapic::Config::Method.new update_data_attribute_binding_config - delete_data_attribute_binding_config = parent_rpcs.delete_data_attribute_binding if parent_rpcs.respond_to? :delete_data_attribute_binding - @delete_data_attribute_binding = ::Gapic::Config::Method.new delete_data_attribute_binding_config - list_data_attribute_bindings_config = parent_rpcs.list_data_attribute_bindings if parent_rpcs.respond_to? :list_data_attribute_bindings - @list_data_attribute_bindings = ::Gapic::Config::Method.new list_data_attribute_bindings_config - get_data_attribute_binding_config = parent_rpcs.get_data_attribute_binding if parent_rpcs.respond_to? :get_data_attribute_binding - @get_data_attribute_binding = ::Gapic::Config::Method.new get_data_attribute_binding_config - create_data_attribute_config = parent_rpcs.create_data_attribute if parent_rpcs.respond_to? :create_data_attribute - @create_data_attribute = ::Gapic::Config::Method.new create_data_attribute_config - update_data_attribute_config = parent_rpcs.update_data_attribute if parent_rpcs.respond_to? :update_data_attribute - @update_data_attribute = ::Gapic::Config::Method.new update_data_attribute_config - delete_data_attribute_config = parent_rpcs.delete_data_attribute if parent_rpcs.respond_to? :delete_data_attribute - @delete_data_attribute = ::Gapic::Config::Method.new delete_data_attribute_config - list_data_attributes_config = parent_rpcs.list_data_attributes if parent_rpcs.respond_to? :list_data_attributes - @list_data_attributes = ::Gapic::Config::Method.new list_data_attributes_config - get_data_attribute_config = parent_rpcs.get_data_attribute if parent_rpcs.respond_to? :get_data_attribute - @get_data_attribute = ::Gapic::Config::Method.new get_data_attribute_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb deleted file mode 100644 index e94682c4a3c8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb +++ /dev/null @@ -1,895 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DataTaxonomyService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTaxonomyService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb deleted file mode 100644 index cf511be91af6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb +++ /dev/null @@ -1,960 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/data_taxonomy_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - module Rest - ## - # REST service stub for the DataTaxonomyService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the create_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_data_taxonomy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_taxonomy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_data_taxonomy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_taxonomy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_data_taxonomy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_taxonomy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_data_taxonomies REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] - # A result object deserialized from the server's reply - def list_data_taxonomies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_taxonomies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # A result object deserialized from the server's reply - def get_data_taxonomy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_taxonomy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataTaxonomy.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_data_attribute_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_attribute_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_data_attribute_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_attribute_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_data_attribute_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_attribute_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_data_attribute_bindings REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] - # A result object deserialized from the server's reply - def list_data_attribute_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_attribute_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # A result object deserialized from the server's reply - def get_data_attribute_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_attribute_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_data_attribute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_attribute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_data_attribute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_attribute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_data_attribute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_attribute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_data_attributes REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] - # A result object deserialized from the server's reply - def list_data_attributes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_attributes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttribute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # A result object deserialized from the server's reply - def get_data_attribute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_attribute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataAttribute.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_taxonomy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTaxonomies", - body: "data_taxonomy", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_taxonomy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_taxonomy.name}", - body: "data_taxonomy", - matches: [ - ["data_taxonomy.name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_taxonomy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_taxonomies REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_taxonomies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataTaxonomies", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_taxonomy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_attribute_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataAttributeBindings", - body: "data_attribute_binding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_attribute_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_attribute_binding.name}", - body: "data_attribute_binding", - matches: [ - ["data_attribute_binding.name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_attribute_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_attribute_bindings REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_attribute_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataAttributeBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_attribute_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_attribute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/attributes", - body: "data_attribute", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_attribute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_attribute.name}", - body: "data_attribute", - matches: [ - ["data_attribute.name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_attribute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_attributes REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_attributes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/attributes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_attribute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb deleted file mode 100644 index b65e661271ce..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb +++ /dev/null @@ -1,77 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/data_taxonomy.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# - -require 'grpc' -require 'google/cloud/dataplex/v1/data_taxonomy_pb' - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.DataTaxonomyService' - - # Create a DataTaxonomy resource. - rpc :CreateDataTaxonomy, ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Google::Longrunning::Operation - # Updates a DataTaxonomy resource. - rpc :UpdateDataTaxonomy, ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Google::Longrunning::Operation - # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - # must be deleted before the DataTaxonomy can be deleted. - rpc :DeleteDataTaxonomy, ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Google::Longrunning::Operation - # Lists DataTaxonomy resources in a project and location. - rpc :ListDataTaxonomies, ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse - # Retrieves a DataTaxonomy resource. - rpc :GetDataTaxonomy, ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Google::Cloud::Dataplex::V1::DataTaxonomy - # Create a DataAttributeBinding resource. - rpc :CreateDataAttributeBinding, ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Google::Longrunning::Operation - # Updates a DataAttributeBinding resource. - rpc :UpdateDataAttributeBinding, ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Google::Longrunning::Operation - # Deletes a DataAttributeBinding resource. All attributes within the - # DataAttributeBinding must be deleted before the DataAttributeBinding can be - # deleted. - rpc :DeleteDataAttributeBinding, ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Google::Longrunning::Operation - # Lists DataAttributeBinding resources in a project and location. - rpc :ListDataAttributeBindings, ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse - # Retrieves a DataAttributeBinding resource. - rpc :GetDataAttributeBinding, ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Google::Cloud::Dataplex::V1::DataAttributeBinding - # Create a DataAttribute resource. - rpc :CreateDataAttribute, ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Google::Longrunning::Operation - # Updates a DataAttribute resource. - rpc :UpdateDataAttribute, ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Google::Longrunning::Operation - # Deletes a Data Attribute resource. - rpc :DeleteDataAttribute, ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Google::Longrunning::Operation - # Lists Data Attribute resources in a DataTaxonomy. - rpc :ListDataAttributes, ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse - # Retrieves a Data Attribute resource. - rpc :GetDataAttribute, ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Google::Cloud::Dataplex::V1::DataAttribute - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb deleted file mode 100644 index aefbd2740e2d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" - -require "google/cloud/dataplex/v1/dataplex_service/credentials" -require "google/cloud/dataplex/v1/dataplex_service/paths" -require "google/cloud/dataplex/v1/dataplex_service/operations" -require "google/cloud/dataplex/v1/dataplex_service/client" -require "google/cloud/dataplex/v1/dataplex_service/rest" - -module Google - module Cloud - module Dataplex - module 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. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1/dataplex_service" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/dataplex/v1/dataplex_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module DataplexService - end - end - end - end -end - -helper_path = ::File.join __dir__, "dataplex_service", "helpers.rb" -require "google/cloud/dataplex/v1/dataplex_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb deleted file mode 100644 index d761c77f09aa..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +++ /dev/null @@ -1,3950 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - ## - # Client for the DataplexService service. - # - # 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 Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dataplex_service_stub - - ## - # Configure the DataplexService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataplexService clients - # ::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_lake.timeout = 60.0 - - default_config.rpcs.update_lake.timeout = 60.0 - - default_config.rpcs.delete_lake.timeout = 60.0 - - default_config.rpcs.list_lakes.timeout = 60.0 - default_config.rpcs.list_lakes.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_lake.timeout = 60.0 - default_config.rpcs.get_lake.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_lake_actions.timeout = 60.0 - default_config.rpcs.list_lake_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_zone.timeout = 60.0 - - default_config.rpcs.update_zone.timeout = 60.0 - - default_config.rpcs.delete_zone.timeout = 60.0 - - default_config.rpcs.list_zones.timeout = 60.0 - default_config.rpcs.list_zones.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_zone.timeout = 60.0 - default_config.rpcs.get_zone.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_zone_actions.timeout = 60.0 - default_config.rpcs.list_zone_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_asset.timeout = 60.0 - - default_config.rpcs.update_asset.timeout = 60.0 - - default_config.rpcs.delete_asset.timeout = 60.0 - - default_config.rpcs.list_assets.timeout = 60.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_asset.timeout = 60.0 - default_config.rpcs.get_asset.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_asset_actions.timeout = 60.0 - default_config.rpcs.list_asset_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_task.timeout = 60.0 - - default_config.rpcs.update_task.timeout = 60.0 - - default_config.rpcs.delete_task.timeout = 60.0 - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_jobs.timeout = 60.0 - default_config.rpcs.list_jobs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_job.timeout = 60.0 - default_config.rpcs.get_job.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.cancel_job.timeout = 60.0 - - default_config.rpcs.create_environment.timeout = 60.0 - - default_config.rpcs.update_environment.timeout = 60.0 - - default_config.rpcs.delete_environment.timeout = 60.0 - - default_config.rpcs.list_environments.timeout = 60.0 - default_config.rpcs.list_environments.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_environment.timeout = 60.0 - default_config.rpcs.get_environment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataplexService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @dataplex_service_stub.universe_domain - end - - ## - # Create a new DataplexService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataplexService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/dataplex/v1/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @dataplex_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dataplex::V1::DataplexService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataplex_service_stub.endpoint - config.universe_domain = @dataplex_service_stub.universe_domain - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataplex_service_stub.endpoint - config.universe_domain = @dataplex_service_stub.universe_domain - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataplexService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Creates a lake resource. - # - # @overload create_lake(request, options = nil) - # Pass arguments to `create_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil) - # Pass arguments to `create_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 lake_id [::String] - # 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 lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] - # Required. Lake resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new - # - # # Call the create_lake method. - # result = client.create_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_lake.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :create_lake, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a lake resource. - # - # @overload update_lake(request, options = nil) - # Pass arguments to `update_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_lake(update_mask: nil, lake: nil, validate_only: nil) - # Pass arguments to `update_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new - # - # # Call the update_lake method. - # result = client.update_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.lake&.name - header_params["lake.name"] = request.lake.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_lake.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :update_lake, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a lake resource. All zones within the lake must be deleted before - # the lake can be deleted. - # - # @overload delete_lake(request, options = nil) - # Pass arguments to `delete_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_lake(name: nil) - # Pass arguments to `delete_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new - # - # # Call the delete_lake method. - # result = client.delete_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_lake.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :delete_lake, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists lake resources in a project and location. - # - # @overload list_lakes(request, options = nil) - # Pass arguments to `list_lakes` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListLakesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lakes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListLakesRequest.new - # - # # Call the list_lakes method. - # result = client.list_lakes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. - # p item - # end - # - def list_lakes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_lakes.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_lakes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lakes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_lakes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lakes, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a lake resource. - # - # @overload get_lake(request, options = nil) - # Pass arguments to `get_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_lake(name: nil) - # Pass arguments to `get_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Lake] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Lake] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetLakeRequest.new - # - # # Call the get_lake method. - # result = client.get_lake request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Lake. - # p result - # - def get_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_lake.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_lake, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in a lake. - # - # @overload list_lake_actions(request, options = nil) - # Pass arguments to `list_lake_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListLakeActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_lake_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_lake_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new - # - # # Call the list_lake_actions method. - # result = client.list_lake_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_lake_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_lake_actions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_lake_actions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lake_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_lake_actions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a zone resource within a lake. - # - # @overload create_zone(request, options = nil) - # Pass arguments to `create_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil) - # Pass arguments to `create_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param zone_id [::String] - # 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 zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] - # Required. Zone resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new - # - # # Call the create_zone method. - # result = client.create_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_zone.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :create_zone, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a zone resource. - # - # @overload update_zone(request, options = nil) - # Pass arguments to `update_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_zone(update_mask: nil, zone: nil, validate_only: nil) - # Pass arguments to `update_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new - # - # # Call the update_zone method. - # result = client.update_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.zone&.name - header_params["zone.name"] = request.zone.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_zone.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :update_zone, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a zone resource. All assets within a zone must be deleted before - # the zone can be deleted. - # - # @overload delete_zone(request, options = nil) - # Pass arguments to `delete_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_zone(name: nil) - # Pass arguments to `delete_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new - # - # # Call the delete_zone method. - # result = client.delete_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_zone.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :delete_zone, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists zone resources in a lake. - # - # @overload list_zones(request, options = nil) - # Pass arguments to `list_zones` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListZonesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_zones` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListZonesRequest.new - # - # # Call the list_zones method. - # result = client.list_zones request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. - # p item - # end - # - def list_zones request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZonesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_zones.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_zones.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_zones.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_zones, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zones, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a zone resource. - # - # @overload get_zone(request, options = nil) - # Pass arguments to `get_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_zone(name: nil) - # Pass arguments to `get_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Zone] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Zone] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetZoneRequest.new - # - # # Call the get_zone method. - # result = client.get_zone request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Zone. - # p result - # - def get_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_zone.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_zone, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in a zone. - # - # @overload list_zone_actions(request, options = nil) - # Pass arguments to `list_zone_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListZoneActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_zone_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_zone_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new - # - # # Call the list_zone_actions method. - # result = client.list_zone_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_zone_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_zone_actions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_zone_actions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_zone_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_zone_actions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an asset resource. - # - # @overload create_asset(request, options = nil) - # Pass arguments to `create_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil) - # Pass arguments to `create_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param asset_id [::String] - # 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 asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] - # Required. Asset resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new - # - # # Call the create_asset method. - # result = client.create_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :create_asset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an asset resource. - # - # @overload update_asset(request, options = nil) - # Pass arguments to `update_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_asset(update_mask: nil, asset: nil, validate_only: nil) - # Pass arguments to `update_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new - # - # # Call the update_asset method. - # result = client.update_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.asset&.name - header_params["asset.name"] = request.asset.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :update_asset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an asset resource. The referenced storage resource is detached - # (default) or deleted based on the associated Lifecycle policy. - # - # @overload delete_asset(request, options = nil) - # Pass arguments to `delete_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_asset(name: nil) - # Pass arguments to `delete_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new - # - # # Call the delete_asset method. - # result = client.delete_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :delete_asset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists asset resources in a zone. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_assets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_assets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_assets, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves an asset resource. - # - # @overload get_asset(request, options = nil) - # Pass arguments to `get_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_asset(name: nil) - # Pass arguments to `get_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Asset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Asset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetAssetRequest.new - # - # # Call the get_asset method. - # result = client.get_asset request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Asset. - # p result - # - def get_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_asset, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in an asset. - # - # @overload list_asset_actions(request, options = nil) - # Pass arguments to `list_asset_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAssetActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_asset_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_asset_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new - # - # # Call the list_asset_actions method. - # result = client.list_asset_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_asset_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_asset_actions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_asset_actions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_asset_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_asset_actions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a task resource within a lake. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_task(parent: nil, task_id: nil, task: nil, validate_only: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param task_id [::String] - # Required. Task identifier. - # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] - # Required. Task resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :create_task, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the task resource. - # - # @overload update_task(request, options = nil) - # Pass arguments to `update_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_task(update_mask: nil, task: nil, validate_only: nil) - # Pass arguments to `update_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new - # - # # Call the update_task method. - # result = client.update_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.task&.name - header_params["task.name"] = request.task.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :update_task, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete the task resource. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_task(name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :delete_task, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists tasks under the given lake. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_tasks, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get task resource. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_task(name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_task, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Jobs under the given task. - # - # @overload list_jobs(request, options = nil) - # Pass arguments to `list_jobs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_jobs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListJobsRequest.new - # - # # Call the list_jobs method. - # result = client.list_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Job. - # p item - # end - # - def list_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_jobs.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_jobs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_jobs, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Run an on demand execution of a Task. - # - # @overload run_task(request, options = nil) - # Pass arguments to `run_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::RunTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_task(name: nil, labels: nil, args: nil) - # Pass arguments to `run_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @param labels [::Hash{::String => ::String}] - # 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 args [::Hash{::String => ::String}] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::RunTaskRequest.new - # - # # Call the run_task method. - # result = client.run_task request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. - # p result - # - def run_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :run_task, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get job resource. - # - # @overload get_job(request, options = nil) - # Pass arguments to `get_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_job(name: nil) - # Pass arguments to `get_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Job] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Job] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetJobRequest.new - # - # # Call the get_job method. - # result = client.get_job request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Job. - # p result - # - def get_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_job.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_job, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancel jobs running for the task resource. - # - # @overload cancel_job(request, options = nil) - # Pass arguments to `cancel_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CancelJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_job(name: nil) - # Pass arguments to `cancel_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CancelJobRequest.new - # - # # Call the cancel_job method. - # result = client.cancel_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_job.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :cancel_job, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create an environment resource. - # - # @overload create_environment(request, options = nil) - # Pass arguments to `create_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_environment(parent: nil, environment_id: nil, environment: nil, validate_only: nil) - # Pass arguments to `create_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - # @param environment_id [::String] - # 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 environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] - # Required. Environment resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new - # - # # Call the create_environment method. - # result = client.create_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_environment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :create_environment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the environment resource. - # - # @overload update_environment(request, options = nil) - # Pass arguments to `update_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_environment(update_mask: nil, environment: nil, validate_only: nil) - # Pass arguments to `update_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new - # - # # Call the update_environment method. - # result = client.update_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.environment&.name - header_params["environment.name"] = request.environment.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_environment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :update_environment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete the environment resource. All the child resources must have been - # deleted before environment deletion can be initiated. - # - # @overload delete_environment(request, options = nil) - # Pass arguments to `delete_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_environment(name: nil) - # Pass arguments to `delete_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the environment: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new - # - # # Call the delete_environment method. - # result = client.delete_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_environment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :delete_environment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists environments under the given lake. - # - # @overload list_environments(request, options = nil) - # Pass arguments to `list_environments` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_environments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_environments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new - # - # # Call the list_environments method. - # result = client.list_environments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Environment. - # p item - # end - # - def list_environments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_environments.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_environments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_environments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_environments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_environments, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get environment resource. - # - # @overload get_environment(request, options = nil) - # Pass arguments to `get_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_environment(name: nil) - # Pass arguments to `get_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the environment: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Environment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Environment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new - # - # # Call the get_environment method. - # result = client.get_environment request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Environment. - # p result - # - def get_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_environment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_environment, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists session resources in an environment. - # - # @overload list_sessions(request, options = nil) - # Pass arguments to `list_sessions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListSessionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListSessionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_sessions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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 - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new - # - # # Call the list_sessions method. - # result = client.list_sessions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Session. - # p item - # end - # - def list_sessions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListSessionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_sessions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_sessions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sessions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_sessions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_sessions, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataplexService API. - # - # This class represents the configuration for DataplexService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_lake to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_lake.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_lake.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DataplexService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lake - ## - # RPC-specific configuration for `update_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lake - ## - # RPC-specific configuration for `delete_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lake - ## - # RPC-specific configuration for `list_lakes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lakes - ## - # RPC-specific configuration for `get_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lake - ## - # RPC-specific configuration for `list_lake_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lake_actions - ## - # RPC-specific configuration for `create_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :create_zone - ## - # RPC-specific configuration for `update_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :update_zone - ## - # RPC-specific configuration for `delete_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_zone - ## - # RPC-specific configuration for `list_zones` - # @return [::Gapic::Config::Method] - # - attr_reader :list_zones - ## - # RPC-specific configuration for `get_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :get_zone - ## - # RPC-specific configuration for `list_zone_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_zone_actions - ## - # RPC-specific configuration for `create_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_asset - ## - # RPC-specific configuration for `update_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_asset - ## - # RPC-specific configuration for `delete_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_asset - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `get_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_asset - ## - # RPC-specific configuration for `list_asset_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_asset_actions - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `update_task` - # @return [::Gapic::Config::Method] - # - attr_reader :update_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `list_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_jobs - ## - # RPC-specific configuration for `run_task` - # @return [::Gapic::Config::Method] - # - attr_reader :run_task - ## - # RPC-specific configuration for `get_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job - ## - # RPC-specific configuration for `cancel_job` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_job - ## - # RPC-specific configuration for `create_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_environment - ## - # RPC-specific configuration for `update_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_environment - ## - # RPC-specific configuration for `delete_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_environment - ## - # RPC-specific configuration for `list_environments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_environments - ## - # RPC-specific configuration for `get_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_environment - ## - # RPC-specific configuration for `list_sessions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sessions - - # @private - def initialize parent_rpcs = nil - create_lake_config = parent_rpcs.create_lake if parent_rpcs.respond_to? :create_lake - @create_lake = ::Gapic::Config::Method.new create_lake_config - update_lake_config = parent_rpcs.update_lake if parent_rpcs.respond_to? :update_lake - @update_lake = ::Gapic::Config::Method.new update_lake_config - delete_lake_config = parent_rpcs.delete_lake if parent_rpcs.respond_to? :delete_lake - @delete_lake = ::Gapic::Config::Method.new delete_lake_config - list_lakes_config = parent_rpcs.list_lakes if parent_rpcs.respond_to? :list_lakes - @list_lakes = ::Gapic::Config::Method.new list_lakes_config - get_lake_config = parent_rpcs.get_lake if parent_rpcs.respond_to? :get_lake - @get_lake = ::Gapic::Config::Method.new get_lake_config - list_lake_actions_config = parent_rpcs.list_lake_actions if parent_rpcs.respond_to? :list_lake_actions - @list_lake_actions = ::Gapic::Config::Method.new list_lake_actions_config - create_zone_config = parent_rpcs.create_zone if parent_rpcs.respond_to? :create_zone - @create_zone = ::Gapic::Config::Method.new create_zone_config - update_zone_config = parent_rpcs.update_zone if parent_rpcs.respond_to? :update_zone - @update_zone = ::Gapic::Config::Method.new update_zone_config - delete_zone_config = parent_rpcs.delete_zone if parent_rpcs.respond_to? :delete_zone - @delete_zone = ::Gapic::Config::Method.new delete_zone_config - list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones - @list_zones = ::Gapic::Config::Method.new list_zones_config - get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone - @get_zone = ::Gapic::Config::Method.new get_zone_config - list_zone_actions_config = parent_rpcs.list_zone_actions if parent_rpcs.respond_to? :list_zone_actions - @list_zone_actions = ::Gapic::Config::Method.new list_zone_actions_config - create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset - @create_asset = ::Gapic::Config::Method.new create_asset_config - update_asset_config = parent_rpcs.update_asset if parent_rpcs.respond_to? :update_asset - @update_asset = ::Gapic::Config::Method.new update_asset_config - delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset - @delete_asset = ::Gapic::Config::Method.new delete_asset_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset - @get_asset = ::Gapic::Config::Method.new get_asset_config - list_asset_actions_config = parent_rpcs.list_asset_actions if parent_rpcs.respond_to? :list_asset_actions - @list_asset_actions = ::Gapic::Config::Method.new list_asset_actions_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task - @update_task = ::Gapic::Config::Method.new update_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs - @list_jobs = ::Gapic::Config::Method.new list_jobs_config - run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task - @run_task = ::Gapic::Config::Method.new run_task_config - get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job - @get_job = ::Gapic::Config::Method.new get_job_config - cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job - @cancel_job = ::Gapic::Config::Method.new cancel_job_config - create_environment_config = parent_rpcs.create_environment if parent_rpcs.respond_to? :create_environment - @create_environment = ::Gapic::Config::Method.new create_environment_config - update_environment_config = parent_rpcs.update_environment if parent_rpcs.respond_to? :update_environment - @update_environment = ::Gapic::Config::Method.new update_environment_config - delete_environment_config = parent_rpcs.delete_environment if parent_rpcs.respond_to? :delete_environment - @delete_environment = ::Gapic::Config::Method.new delete_environment_config - list_environments_config = parent_rpcs.list_environments if parent_rpcs.respond_to? :list_environments - @list_environments = ::Gapic::Config::Method.new list_environments_config - get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment - @get_environment = ::Gapic::Config::Method.new get_environment_config - list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions - @list_sessions = ::Gapic::Config::Method.new list_sessions_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb deleted file mode 100644 index ca24868d1300..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - # Credentials for the DataplexService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb deleted file mode 100644 index e9203215706a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +++ /dev/null @@ -1,801 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DataplexService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataplexService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb deleted file mode 100644 index bf8d60dd39e3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb +++ /dev/null @@ -1,178 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - # Path helper methods for the DataplexService API. - module Paths - ## - # Create a fully-qualified Asset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # @param asset [String] - # - # @return [::String] - def asset_path project:, location:, lake:, zone:, asset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/assets/#{asset}" - end - - ## - # Create a fully-qualified Environment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param environment [String] - # - # @return [::String] - def environment_path project:, location:, lake:, environment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/environments/#{environment}" - end - - ## - # Create a fully-qualified Job resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param task [String] - # @param job [String] - # - # @return [::String] - def job_path project:, location:, lake:, task:, job: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "task cannot contain /" if task.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/tasks/#{task}/jobs/#{job}" - end - - ## - # Create a fully-qualified Lake resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # - # @return [::String] - def lake_path project:, location:, lake: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Task resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param task [String] - # - # @return [::String] - def task_path project:, location:, lake:, task: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/tasks/#{task}" - end - - ## - # Create a fully-qualified Zone resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # - # @return [::String] - def zone_path project:, location:, lake:, zone: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb deleted file mode 100644 index 76c9f9aa9a0d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/dataplex_service/credentials" -require "google/cloud/dataplex/v1/dataplex_service/paths" -require "google/cloud/dataplex/v1/dataplex_service/rest/operations" -require "google/cloud/dataplex/v1/dataplex_service/rest/client" - -module Google - module Cloud - module Dataplex - module 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. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/dataplex_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module DataplexService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/dataplex_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb deleted file mode 100644 index 6c8e3c4c6d88..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +++ /dev/null @@ -1,3700 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/service_pb" -require "google/cloud/dataplex/v1/dataplex_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - module Rest - ## - # REST client for the DataplexService service. - # - # 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 Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dataplex_service_stub - - ## - # Configure the DataplexService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataplexService clients - # ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_lake.timeout = 60.0 - - default_config.rpcs.update_lake.timeout = 60.0 - - default_config.rpcs.delete_lake.timeout = 60.0 - - default_config.rpcs.list_lakes.timeout = 60.0 - default_config.rpcs.list_lakes.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_lake.timeout = 60.0 - default_config.rpcs.get_lake.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_lake_actions.timeout = 60.0 - default_config.rpcs.list_lake_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_zone.timeout = 60.0 - - default_config.rpcs.update_zone.timeout = 60.0 - - default_config.rpcs.delete_zone.timeout = 60.0 - - default_config.rpcs.list_zones.timeout = 60.0 - default_config.rpcs.list_zones.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_zone.timeout = 60.0 - default_config.rpcs.get_zone.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_zone_actions.timeout = 60.0 - default_config.rpcs.list_zone_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_asset.timeout = 60.0 - - default_config.rpcs.update_asset.timeout = 60.0 - - default_config.rpcs.delete_asset.timeout = 60.0 - - default_config.rpcs.list_assets.timeout = 60.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_asset.timeout = 60.0 - default_config.rpcs.get_asset.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_asset_actions.timeout = 60.0 - default_config.rpcs.list_asset_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_task.timeout = 60.0 - - default_config.rpcs.update_task.timeout = 60.0 - - default_config.rpcs.delete_task.timeout = 60.0 - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_jobs.timeout = 60.0 - default_config.rpcs.list_jobs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_job.timeout = 60.0 - default_config.rpcs.get_job.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.cancel_job.timeout = 60.0 - - default_config.rpcs.create_environment.timeout = 60.0 - - default_config.rpcs.update_environment.timeout = 60.0 - - default_config.rpcs.delete_environment.timeout = 60.0 - - default_config.rpcs.list_environments.timeout = 60.0 - default_config.rpcs.list_environments.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_environment.timeout = 60.0 - default_config.rpcs.get_environment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataplexService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @dataplex_service_stub.universe_domain - end - - ## - # Create a new DataplexService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataplexService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @dataplex_service_stub = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataplex_service_stub.endpoint - config.universe_domain = @dataplex_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataplex_service_stub.endpoint - config.universe_domain = @dataplex_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataplexService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Creates a lake resource. - # - # @overload create_lake(request, options = nil) - # Pass arguments to `create_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil) - # Pass arguments to `create_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 lake_id [::String] - # 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 lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] - # Required. Lake resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new - # - # # Call the create_lake method. - # result = client.create_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_lake.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.create_lake request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a lake resource. - # - # @overload update_lake(request, options = nil) - # Pass arguments to `update_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_lake(update_mask: nil, lake: nil, validate_only: nil) - # Pass arguments to `update_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new - # - # # Call the update_lake method. - # result = client.update_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_lake.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.update_lake request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a lake resource. All zones within the lake must be deleted before - # the lake can be deleted. - # - # @overload delete_lake(request, options = nil) - # Pass arguments to `delete_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_lake(name: nil) - # Pass arguments to `delete_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new - # - # # Call the delete_lake method. - # result = client.delete_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_lake.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.delete_lake request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists lake resources in a project and location. - # - # @overload list_lakes(request, options = nil) - # Pass arguments to `list_lakes` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListLakesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lakes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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 page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListLakesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListLakesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListLakesRequest.new - # - # # Call the list_lakes method. - # result = client.list_lakes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. - # p item - # end - # - def list_lakes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_lakes.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_lakes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lakes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_lakes request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a lake resource. - # - # @overload get_lake(request, options = nil) - # Pass arguments to `get_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_lake(name: nil) - # Pass arguments to `get_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Lake] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Lake] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetLakeRequest.new - # - # # Call the get_lake method. - # result = client.get_lake request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Lake. - # p result - # - def get_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_lake.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_lake.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_lake request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in a lake. - # - # @overload list_lake_actions(request, options = nil) - # Pass arguments to `list_lake_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListLakeActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_lake_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_lake_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new - # - # # Call the list_lake_actions method. - # result = client.list_lake_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_lake_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_lake_actions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_lake_actions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lake_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_lake_actions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, "actions", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a zone resource within a lake. - # - # @overload create_zone(request, options = nil) - # Pass arguments to `create_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil) - # Pass arguments to `create_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param zone_id [::String] - # 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 zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] - # Required. Zone resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new - # - # # Call the create_zone method. - # result = client.create_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_zone.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.create_zone request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a zone resource. - # - # @overload update_zone(request, options = nil) - # Pass arguments to `update_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_zone(update_mask: nil, zone: nil, validate_only: nil) - # Pass arguments to `update_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new - # - # # Call the update_zone method. - # result = client.update_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_zone.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.update_zone request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a zone resource. All assets within a zone must be deleted before - # the zone can be deleted. - # - # @overload delete_zone(request, options = nil) - # Pass arguments to `delete_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_zone(name: nil) - # Pass arguments to `delete_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new - # - # # Call the delete_zone method. - # result = client.delete_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_zone.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.delete_zone request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists zone resources in a lake. - # - # @overload list_zones(request, options = nil) - # Pass arguments to `list_zones` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListZonesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_zones` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListZonesRequest.new - # - # # Call the list_zones method. - # result = client.list_zones request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. - # p item - # end - # - def list_zones request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZonesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_zones.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_zones.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_zones.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_zones request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zones, "zones", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a zone resource. - # - # @overload get_zone(request, options = nil) - # Pass arguments to `get_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_zone(name: nil) - # Pass arguments to `get_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Zone] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Zone] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetZoneRequest.new - # - # # Call the get_zone method. - # result = client.get_zone request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Zone. - # p result - # - def get_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_zone.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_zone.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_zone request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in a zone. - # - # @overload list_zone_actions(request, options = nil) - # Pass arguments to `list_zone_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListZoneActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_zone_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_zone_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new - # - # # Call the list_zone_actions method. - # result = client.list_zone_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_zone_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_zone_actions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_zone_actions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_zone_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_zone_actions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, "actions", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an asset resource. - # - # @overload create_asset(request, options = nil) - # Pass arguments to `create_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil) - # Pass arguments to `create_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param asset_id [::String] - # 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 asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] - # Required. Asset resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new - # - # # Call the create_asset method. - # result = client.create_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.create_asset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an asset resource. - # - # @overload update_asset(request, options = nil) - # Pass arguments to `update_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_asset(update_mask: nil, asset: nil, validate_only: nil) - # Pass arguments to `update_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new - # - # # Call the update_asset method. - # result = client.update_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.update_asset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an asset resource. The referenced storage resource is detached - # (default) or deleted based on the associated Lifecycle policy. - # - # @overload delete_asset(request, options = nil) - # Pass arguments to `delete_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_asset(name: nil) - # Pass arguments to `delete_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new - # - # # Call the delete_asset method. - # result = client.delete_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.delete_asset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists asset resources in a zone. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_assets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_assets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_assets, "assets", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves an asset resource. - # - # @overload get_asset(request, options = nil) - # Pass arguments to `get_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_asset(name: nil) - # Pass arguments to `get_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Asset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Asset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetAssetRequest.new - # - # # Call the get_asset method. - # result = client.get_asset request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Asset. - # p result - # - def get_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_asset.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_asset request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in an asset. - # - # @overload list_asset_actions(request, options = nil) - # Pass arguments to `list_asset_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAssetActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_asset_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_asset_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new - # - # # Call the list_asset_actions method. - # result = client.list_asset_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_asset_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_asset_actions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_asset_actions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_asset_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_asset_actions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, "actions", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a task resource within a lake. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_task(parent: nil, task_id: nil, task: nil, validate_only: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param task_id [::String] - # Required. Task identifier. - # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] - # Required. Task resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.create_task request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the task resource. - # - # @overload update_task(request, options = nil) - # Pass arguments to `update_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_task(update_mask: nil, task: nil, validate_only: nil) - # Pass arguments to `update_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new - # - # # Call the update_task method. - # result = client.update_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.update_task request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete the task resource. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_task(name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.delete_task request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists tasks under the given lake. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListTasksResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_tasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_tasks request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get task resource. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_task(name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_task request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Jobs under the given task. - # - # @overload list_jobs(request, options = nil) - # Pass arguments to `list_jobs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_jobs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListJobsRequest.new - # - # # Call the list_jobs method. - # result = client.list_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Job. - # p item - # end - # - def list_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_jobs.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_jobs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_jobs, "jobs", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Run an on demand execution of a Task. - # - # @overload run_task(request, options = nil) - # Pass arguments to `run_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::RunTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_task(name: nil, labels: nil, args: nil) - # Pass arguments to `run_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @param labels [::Hash{::String => ::String}] - # 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 args [::Hash{::String => ::String}] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::RunTaskRequest.new - # - # # Call the run_task method. - # result = client.run_task request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. - # p result - # - def run_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_task.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.run_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.run_task request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get job resource. - # - # @overload get_job(request, options = nil) - # Pass arguments to `get_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_job(name: nil) - # Pass arguments to `get_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Job] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetJobRequest.new - # - # # Call the get_job method. - # result = client.get_job request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Job. - # p result - # - def get_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_job.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_job request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancel jobs running for the task resource. - # - # @overload cancel_job(request, options = nil) - # Pass arguments to `cancel_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CancelJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_job(name: nil) - # Pass arguments to `cancel_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CancelJobRequest.new - # - # # Call the cancel_job method. - # result = client.cancel_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_job.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.cancel_job request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create an environment resource. - # - # @overload create_environment(request, options = nil) - # Pass arguments to `create_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_environment(parent: nil, environment_id: nil, environment: nil, validate_only: nil) - # Pass arguments to `create_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - # @param environment_id [::String] - # 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 environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] - # Required. Environment resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new - # - # # Call the create_environment method. - # result = client.create_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_environment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.create_environment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the environment resource. - # - # @overload update_environment(request, options = nil) - # Pass arguments to `update_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_environment(update_mask: nil, environment: nil, validate_only: nil) - # Pass arguments to `update_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param environment [::Google::Cloud::Dataplex::V1::Environment, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new - # - # # Call the update_environment method. - # result = client.update_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_environment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.update_environment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete the environment resource. All the child resources must have been - # deleted before environment deletion can be initiated. - # - # @overload delete_environment(request, options = nil) - # Pass arguments to `delete_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_environment(name: nil) - # Pass arguments to `delete_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the environment: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new - # - # # Call the delete_environment method. - # result = client.delete_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_environment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.delete_environment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists environments under the given lake. - # - # @overload list_environments(request, options = nil) - # Pass arguments to `list_environments` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_environments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_environments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Environment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new - # - # # Call the list_environments method. - # result = client.list_environments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Environment. - # p item - # end - # - def list_environments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_environments.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_environments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_environments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_environments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_environments, "environments", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get environment resource. - # - # @overload get_environment(request, options = nil) - # Pass arguments to `get_environment` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_environment(name: nil) - # Pass arguments to `get_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the environment: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Environment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Environment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new - # - # # Call the get_environment method. - # result = client.get_environment request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Environment. - # p result - # - def get_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_environment.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_environment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_environment request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists session resources in an environment. - # - # @overload list_sessions(request, options = nil) - # Pass arguments to `list_sessions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListSessionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListSessionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_sessions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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 - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new - # - # # Call the list_sessions method. - # result = client.list_sessions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Session. - # p item - # end - # - def list_sessions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListSessionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_sessions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_sessions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_sessions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_sessions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_sessions, "sessions", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataplexService REST API. - # - # This class represents the configuration for DataplexService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_lake to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_lake.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_lake.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the DataplexService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lake - ## - # RPC-specific configuration for `update_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lake - ## - # RPC-specific configuration for `delete_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lake - ## - # RPC-specific configuration for `list_lakes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lakes - ## - # RPC-specific configuration for `get_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lake - ## - # RPC-specific configuration for `list_lake_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lake_actions - ## - # RPC-specific configuration for `create_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :create_zone - ## - # RPC-specific configuration for `update_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :update_zone - ## - # RPC-specific configuration for `delete_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_zone - ## - # RPC-specific configuration for `list_zones` - # @return [::Gapic::Config::Method] - # - attr_reader :list_zones - ## - # RPC-specific configuration for `get_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :get_zone - ## - # RPC-specific configuration for `list_zone_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_zone_actions - ## - # RPC-specific configuration for `create_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_asset - ## - # RPC-specific configuration for `update_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_asset - ## - # RPC-specific configuration for `delete_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_asset - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `get_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_asset - ## - # RPC-specific configuration for `list_asset_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_asset_actions - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `update_task` - # @return [::Gapic::Config::Method] - # - attr_reader :update_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `list_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_jobs - ## - # RPC-specific configuration for `run_task` - # @return [::Gapic::Config::Method] - # - attr_reader :run_task - ## - # RPC-specific configuration for `get_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job - ## - # RPC-specific configuration for `cancel_job` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_job - ## - # RPC-specific configuration for `create_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_environment - ## - # RPC-specific configuration for `update_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_environment - ## - # RPC-specific configuration for `delete_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_environment - ## - # RPC-specific configuration for `list_environments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_environments - ## - # RPC-specific configuration for `get_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_environment - ## - # RPC-specific configuration for `list_sessions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sessions - - # @private - def initialize parent_rpcs = nil - create_lake_config = parent_rpcs.create_lake if parent_rpcs.respond_to? :create_lake - @create_lake = ::Gapic::Config::Method.new create_lake_config - update_lake_config = parent_rpcs.update_lake if parent_rpcs.respond_to? :update_lake - @update_lake = ::Gapic::Config::Method.new update_lake_config - delete_lake_config = parent_rpcs.delete_lake if parent_rpcs.respond_to? :delete_lake - @delete_lake = ::Gapic::Config::Method.new delete_lake_config - list_lakes_config = parent_rpcs.list_lakes if parent_rpcs.respond_to? :list_lakes - @list_lakes = ::Gapic::Config::Method.new list_lakes_config - get_lake_config = parent_rpcs.get_lake if parent_rpcs.respond_to? :get_lake - @get_lake = ::Gapic::Config::Method.new get_lake_config - list_lake_actions_config = parent_rpcs.list_lake_actions if parent_rpcs.respond_to? :list_lake_actions - @list_lake_actions = ::Gapic::Config::Method.new list_lake_actions_config - create_zone_config = parent_rpcs.create_zone if parent_rpcs.respond_to? :create_zone - @create_zone = ::Gapic::Config::Method.new create_zone_config - update_zone_config = parent_rpcs.update_zone if parent_rpcs.respond_to? :update_zone - @update_zone = ::Gapic::Config::Method.new update_zone_config - delete_zone_config = parent_rpcs.delete_zone if parent_rpcs.respond_to? :delete_zone - @delete_zone = ::Gapic::Config::Method.new delete_zone_config - list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones - @list_zones = ::Gapic::Config::Method.new list_zones_config - get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone - @get_zone = ::Gapic::Config::Method.new get_zone_config - list_zone_actions_config = parent_rpcs.list_zone_actions if parent_rpcs.respond_to? :list_zone_actions - @list_zone_actions = ::Gapic::Config::Method.new list_zone_actions_config - create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset - @create_asset = ::Gapic::Config::Method.new create_asset_config - update_asset_config = parent_rpcs.update_asset if parent_rpcs.respond_to? :update_asset - @update_asset = ::Gapic::Config::Method.new update_asset_config - delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset - @delete_asset = ::Gapic::Config::Method.new delete_asset_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset - @get_asset = ::Gapic::Config::Method.new get_asset_config - list_asset_actions_config = parent_rpcs.list_asset_actions if parent_rpcs.respond_to? :list_asset_actions - @list_asset_actions = ::Gapic::Config::Method.new list_asset_actions_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task - @update_task = ::Gapic::Config::Method.new update_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs - @list_jobs = ::Gapic::Config::Method.new list_jobs_config - run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task - @run_task = ::Gapic::Config::Method.new run_task_config - get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job - @get_job = ::Gapic::Config::Method.new get_job_config - cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job - @cancel_job = ::Gapic::Config::Method.new cancel_job_config - create_environment_config = parent_rpcs.create_environment if parent_rpcs.respond_to? :create_environment - @create_environment = ::Gapic::Config::Method.new create_environment_config - update_environment_config = parent_rpcs.update_environment if parent_rpcs.respond_to? :update_environment - @update_environment = ::Gapic::Config::Method.new update_environment_config - delete_environment_config = parent_rpcs.delete_environment if parent_rpcs.respond_to? :delete_environment - @delete_environment = ::Gapic::Config::Method.new delete_environment_config - list_environments_config = parent_rpcs.list_environments if parent_rpcs.respond_to? :list_environments - @list_environments = ::Gapic::Config::Method.new list_environments_config - get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment - @get_environment = ::Gapic::Config::Method.new get_environment_config - list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions - @list_sessions = ::Gapic::Config::Method.new list_sessions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb deleted file mode 100644 index 0dec2450e6f8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb +++ /dev/null @@ -1,895 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DataplexService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataplexService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # 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 {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb deleted file mode 100644 index 8a828884a451..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb +++ /dev/null @@ -1,2028 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/service_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - module Rest - ## - # REST service stub for the DataplexService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the create_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateLakeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_lake request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_lake_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateLakeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_lake request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_lake_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteLakeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_lake request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_lake_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_lakes REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListLakesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListLakesResponse] - # A result object deserialized from the server's reply - def list_lakes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lakes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListLakesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetLakeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Lake] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Lake] - # A result object deserialized from the server's reply - def get_lake request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lake_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Lake.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_lake_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # A result object deserialized from the server's reply - def list_lake_actions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lake_actions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateZoneRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_zone request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_zone_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateZoneRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_zone request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_zone_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteZoneRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_zone request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_zone_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_zones REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListZonesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListZonesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListZonesResponse] - # A result object deserialized from the server's reply - def list_zones request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_zones_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListZonesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetZoneRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Zone] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Zone] - # A result object deserialized from the server's reply - def get_zone request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_zone_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Zone.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_zone_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # A result object deserialized from the server's reply - def list_zone_actions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_zone_actions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_assets REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAssetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListAssetsResponse] - # A result object deserialized from the server's reply - def list_assets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Asset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Asset] - # A result object deserialized from the server's reply - def get_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Asset.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_asset_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # A result object deserialized from the server's reply - def list_asset_actions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_asset_actions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_tasks REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListTasksResponse] - # A result object deserialized from the server's reply - def list_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Task] - # A result object deserialized from the server's reply - def get_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Task.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_jobs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListJobsResponse] - # A result object deserialized from the server's reply - def list_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the run_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::RunTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # A result object deserialized from the server's reply - def run_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::RunTaskResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Job] - # A result object deserialized from the server's reply - def get_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Job.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the cancel_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CancelJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_cancel_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_environment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_environment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_environment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_environment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_environment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_environment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_environments REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse] - # A result object deserialized from the server's reply - def list_environments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_environments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Environment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Environment] - # A result object deserialized from the server's reply - def get_environment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_environment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Environment.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_sessions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListSessionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListSessionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListSessionsResponse] - # A result object deserialized from the server's reply - def list_sessions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_sessions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListSessionsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the create_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateLakeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_lake_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/lakes", - body: "lake", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateLakeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_lake_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{lake.name}", - body: "lake", - matches: [ - ["lake.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteLakeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_lake_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_lakes REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_lakes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/lakes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetLakeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_lake_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_lake_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_lake_actions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/actions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateZoneRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_zone_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/zones", - body: "zone", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateZoneRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_zone_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{zone.name}", - body: "zone", - matches: [ - ["zone.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteZoneRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_zone_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_zones REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListZonesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_zones_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/zones", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetZoneRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_zone_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_zone_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_zone_actions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/actions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/assets", - body: "asset", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{asset.name}", - body: "asset", - matches: [ - ["asset.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_assets REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_assets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/assets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_asset_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_asset_actions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/actions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tasks", - body: "task", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{task.name}", - body: "task", - matches: [ - ["task.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tasks REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/tasks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_jobs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListJobsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/jobs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::RunTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:run", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CancelJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_environment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/environments", - body: "environment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_environment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{environment.name}", - body: "environment", - matches: [ - ["environment.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_environment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_environments REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_environments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/environments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_environment REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEnvironmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_environment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sessions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListSessionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_sessions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/sessions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb deleted file mode 100644 index 36b7d41e7d77..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb +++ /dev/null @@ -1,81 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/datascans.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/data_profile_pb' -require 'google/cloud/dataplex/v1/data_quality_pb' -require 'google/cloud/dataplex/v1/processing_pb' -require 'google/cloud/dataplex/v1/resources_pb' -require 'google/cloud/dataplex/v1/service_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n(google/cloud/dataplex/v1/datascans.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/dataplex/v1/data_profile.proto\x1a+google/cloud/dataplex/v1/data_quality.proto\x1a)google/cloud/dataplex/v1/processing.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc5\x01\n\x15\x43reateDataScanRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\tdata_scan\x18\x02 \x01(\x0b\x32\".google.cloud.dataplex.v1.DataScanB\x03\xe0\x41\x02\x12\x19\n\x0c\x64\x61ta_scan_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa5\x01\n\x15UpdateDataScanRequest\x12:\n\tdata_scan\x18\x01 \x01(\x0b\x32\".google.cloud.dataplex.v1.DataScanB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x15\x44\x65leteDataScanRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\"\xdf\x01\n\x12GetDataScanRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\x12L\n\x04view\x18\x02 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.GetDataScanRequest.DataScanViewB\x03\xe0\x41\x01\"C\n\x0c\x44\x61taScanView\x12\x1e\n\x1a\x44\x41TA_SCAN_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\n\"\xae\x01\n\x14ListDataScansRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"}\n\x15ListDataScansResponse\x12\x36\n\ndata_scans\x18\x01 \x03(\x0b\x32\".google.cloud.dataplex.v1.DataScan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"L\n\x12RunDataScanRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\"I\n\x13RunDataScanResponse\x12\x32\n\x03job\x18\x01 \x01(\x0b\x32%.google.cloud.dataplex.v1.DataScanJob\"\xf2\x01\n\x15GetDataScanJobRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/DataScanJob\x12R\n\x04view\x18\x02 \x01(\x0e\x32?.google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobViewB\x03\xe0\x41\x01\"J\n\x0f\x44\x61taScanJobView\x12\"\n\x1e\x44\x41TA_SCAN_JOB_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\n\"\x99\x01\n\x17ListDataScanJobsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"r\n\x18ListDataScanJobsResponse\x12=\n\x0e\x64\x61ta_scan_jobs\x18\x01 \x03(\x0b\x32%.google.cloud.dataplex.v1.DataScanJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"4\n\x1fGenerateDataQualityRulesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"[\n GenerateDataQualityRulesResponse\x12\x37\n\x04rule\x18\x01 \x03(\x0b\x32).google.cloud.dataplex.v1.DataQualityRule\"\xb1\n\n\x08\x44\x61taScan\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x06labels\x18\x05 \x03(\x0b\x32..google.cloud.dataplex.v1.DataScan.LabelsEntryB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x06 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x04\x64\x61ta\x18\t \x01(\x0b\x32$.google.cloud.dataplex.v1.DataSourceB\x03\xe0\x41\x02\x12M\n\x0e\x65xecution_spec\x18\n \x01(\x0b\x32\x30.google.cloud.dataplex.v1.DataScan.ExecutionSpecB\x03\xe0\x41\x01\x12Q\n\x10\x65xecution_status\x18\x0b \x01(\x0b\x32\x32.google.cloud.dataplex.v1.DataScan.ExecutionStatusB\x03\xe0\x41\x03\x12\x39\n\x04type\x18\x0c \x01(\x0e\x32&.google.cloud.dataplex.v1.DataScanTypeB\x03\xe0\x41\x03\x12\x46\n\x11\x64\x61ta_quality_spec\x18\x64 \x01(\x0b\x32).google.cloud.dataplex.v1.DataQualitySpecH\x00\x12\x46\n\x11\x64\x61ta_profile_spec\x18\x65 \x01(\x0b\x32).google.cloud.dataplex.v1.DataProfileSpecH\x00\x12P\n\x13\x64\x61ta_quality_result\x18\xc8\x01 \x01(\x0b\x32+.google.cloud.dataplex.v1.DataQualityResultB\x03\xe0\x41\x03H\x01\x12P\n\x13\x64\x61ta_profile_result\x18\xc9\x01 \x01(\x0b\x32+.google.cloud.dataplex.v1.DataProfileResultB\x03\xe0\x41\x03H\x01\x1am\n\rExecutionSpec\x12\x37\n\x07trigger\x18\x01 \x01(\x0b\x32!.google.cloud.dataplex.v1.TriggerB\x03\xe0\x41\x01\x12\x14\n\x05\x66ield\x18\x64 \x01(\tB\x03\xe0\x41\x05H\x00\x42\r\n\x0bincremental\x1a\x85\x01\n\x0f\x45xecutionStatus\x12\x39\n\x15latest_job_start_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x13latest_job_end_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:c\xea\x41`\n dataplex.googleapis.com/DataScan\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/dataScans\x12\xaf\x01\n\x0bRunDataScan\x12,.google.cloud.dataplex.v1.RunDataScanRequest\x1a-.google.cloud.dataplex.v1.RunDataScanResponse\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/dataScans/*}:run:\x01*\x12\xad\x01\n\x0eGetDataScanJob\x12/.google.cloud.dataplex.v1.GetDataScanJobRequest\x1a%.google.cloud.dataplex.v1.DataScanJob\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}\x12\xc0\x01\n\x10ListDataScanJobs\x12\x31.google.cloud.dataplex.v1.ListDataScanJobsRequest\x1a\x32.google.cloud.dataplex.v1.ListDataScanJobsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*/dataScans/*}/jobs\x12\xc1\x02\n\x18GenerateDataQualityRules\x12\x39.google.cloud.dataplex.v1.GenerateDataQualityRulesRequest\x1a:.google.cloud.dataplex.v1.GenerateDataQualityRulesResponse\"\xad\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x9f\x01\"F/v1/{name=projects/*/locations/*/dataScans/*}:generateDataQualityRules:\x01*ZR\"M/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}:generateDataQualityRules:\x01*\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBj\n\x1c\x63om.google.cloud.dataplex.v1B\x0e\x44\x61taScansProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ["google.cloud.dataplex.v1.DataQualityRule", "google/cloud/dataplex/v1/data_quality.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.dataplex.v1.DataSource", "google/cloud/dataplex/v1/processing.proto"], - ["google.cloud.dataplex.v1.DataProfileSpec", "google/cloud/dataplex/v1/data_profile.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - CreateDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataScanRequest").msgclass - UpdateDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataScanRequest").msgclass - DeleteDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataScanRequest").msgclass - GetDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanRequest").msgclass - GetDataScanRequest::DataScanView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanRequest.DataScanView").enummodule - ListDataScansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScansRequest").msgclass - ListDataScansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScansResponse").msgclass - RunDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunDataScanRequest").msgclass - RunDataScanResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunDataScanResponse").msgclass - GetDataScanJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanJobRequest").msgclass - GetDataScanJobRequest::DataScanJobView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView").enummodule - ListDataScanJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScanJobsRequest").msgclass - ListDataScanJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScanJobsResponse").msgclass - GenerateDataQualityRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GenerateDataQualityRulesRequest").msgclass - GenerateDataQualityRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GenerateDataQualityRulesResponse").msgclass - DataScan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan").msgclass - DataScan::ExecutionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan.ExecutionSpec").msgclass - DataScan::ExecutionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan.ExecutionStatus").msgclass - DataScanJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanJob").msgclass - DataScanJob::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanJob.State").enummodule - DataScanType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb deleted file mode 100644 index 42b166f1493f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb +++ /dev/null @@ -1,63 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/datascans.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# - -require 'grpc' -require 'google/cloud/dataplex/v1/datascans_pb' - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - # 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 Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.DataScanService' - - # Creates a DataScan resource. - rpc :CreateDataScan, ::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Google::Longrunning::Operation - # Updates a DataScan resource. - rpc :UpdateDataScan, ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Google::Longrunning::Operation - # Deletes a DataScan resource. - rpc :DeleteDataScan, ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Google::Longrunning::Operation - # Gets a DataScan resource. - rpc :GetDataScan, ::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Google::Cloud::Dataplex::V1::DataScan - # Lists DataScans. - rpc :ListDataScans, ::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Google::Cloud::Dataplex::V1::ListDataScansResponse - # Runs an on-demand execution of a DataScan - rpc :RunDataScan, ::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Google::Cloud::Dataplex::V1::RunDataScanResponse - # Gets a DataScanJob resource. - rpc :GetDataScanJob, ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Google::Cloud::Dataplex::V1::DataScanJob - # Lists DataScanJobs under the given DataScan. - rpc :ListDataScanJobs, ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse - # Generates recommended DataQualityRule from a data profiling DataScan. - rpc :GenerateDataQualityRules, ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb deleted file mode 100644 index 358f748a0eaa..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb +++ /dev/null @@ -1,84 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/logs.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n#google/cloud/dataplex/v1/logs.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\t\n\x0e\x44iscoveryEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07lake_id\x18\x02 \x01(\t\x12\x0f\n\x07zone_id\x18\x03 \x01(\t\x12\x10\n\x08\x61sset_id\x18\x04 \x01(\t\x12\x15\n\rdata_location\x18\x05 \x01(\t\x12@\n\x04type\x18\n \x01(\x0e\x32\x32.google.cloud.dataplex.v1.DiscoveryEvent.EventType\x12H\n\x06\x63onfig\x18\x14 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetailsH\x00\x12H\n\x06\x65ntity\x18\x15 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetailsH\x00\x12N\n\tpartition\x18\x16 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetailsH\x00\x12H\n\x06\x61\x63tion\x18\x17 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetailsH\x00\x1a\x9e\x01\n\rConfigDetails\x12Z\n\nparameters\x18\x01 \x03(\x0b\x32\x46.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.ParametersEntry\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x62\n\rEntityDetails\x12\x0e\n\x06\x65ntity\x18\x01 \x01(\t\x12\x41\n\x04type\x18\x02 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.DiscoveryEvent.EntityType\x1a\x98\x01\n\x10PartitionDetails\x12\x11\n\tpartition\x18\x01 \x01(\t\x12\x0e\n\x06\x65ntity\x18\x02 \x01(\t\x12\x41\n\x04type\x18\x03 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.DiscoveryEvent.EntityType\x12\x1e\n\x16sampled_data_locations\x18\x04 \x03(\t\x1a\x1d\n\rActionDetails\x12\x0c\n\x04type\x18\x01 \x01(\t\"\xb4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43ONFIG\x10\x01\x12\x12\n\x0e\x45NTITY_CREATED\x10\x02\x12\x12\n\x0e\x45NTITY_UPDATED\x10\x03\x12\x12\n\x0e\x45NTITY_DELETED\x10\x04\x12\x15\n\x11PARTITION_CREATED\x10\x05\x12\x15\n\x11PARTITION_UPDATED\x10\x06\x12\x15\n\x11PARTITION_DELETED\x10\x07\"A\n\nEntityType\x12\x1b\n\x17\x45NTITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02\x42\t\n\x07\x64\x65tails\"\xc5\x05\n\x08JobEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x05state\x18\x05 \x01(\x0e\x32(.google.cloud.dataplex.v1.JobEvent.State\x12\x0f\n\x07retries\x18\x06 \x01(\x05\x12\x35\n\x04type\x18\x07 \x01(\x0e\x32\'.google.cloud.dataplex.v1.JobEvent.Type\x12;\n\x07service\x18\x08 \x01(\x0e\x32*.google.cloud.dataplex.v1.JobEvent.Service\x12\x13\n\x0bservice_job\x18\t \x01(\t\x12N\n\x11\x65xecution_trigger\x18\x0b \x01(\x0e\x32\x33.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger\"5\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05SPARK\x10\x01\x12\x0c\n\x08NOTEBOOK\x10\x02\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\x0b\n\x07\x41\x42ORTED\x10\x04\"0\n\x07Service\x12\x17\n\x13SERVICE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TAPROC\x10\x01\"W\n\x10\x45xecutionTrigger\x12!\n\x1d\x45XECUTION_TRIGGER_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTASK_CONFIG\x10\x01\x12\x0f\n\x0bRUN_REQUEST\x10\x02\"\xbd\x05\n\x0cSessionEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07user_id\x18\x02 \x01(\t\x12\x12\n\nsession_id\x18\x03 \x01(\t\x12>\n\x04type\x18\x04 \x01(\x0e\x32\x30.google.cloud.dataplex.v1.SessionEvent.EventType\x12\x43\n\x05query\x18\x05 \x01(\x0b\x32\x32.google.cloud.dataplex.v1.SessionEvent.QueryDetailH\x00\x12\x17\n\x0f\x65vent_succeeded\x18\x06 \x01(\x08\x12\x1c\n\x14\x66\x61st_startup_enabled\x18\x07 \x01(\x08\x12\x36\n\x13unassigned_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\xa3\x02\n\x0bQueryDetail\x12\x10\n\x08query_id\x18\x01 \x01(\t\x12\x12\n\nquery_text\x18\x02 \x01(\t\x12I\n\x06\x65ngine\x18\x03 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine\x12+\n\x08\x64uration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x19\n\x11result_size_bytes\x18\x05 \x01(\x03\x12\x1c\n\x14\x64\x61ta_processed_bytes\x18\x06 \x01(\x03\"=\n\x06\x45ngine\x12\x16\n\x12\x45NGINE_UNSPECIFIED\x10\x00\x12\r\n\tSPARK_SQL\x10\x01\x12\x0c\n\x08\x42IGQUERY\x10\x02\"S\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05START\x10\x01\x12\x08\n\x04STOP\x10\x02\x12\t\n\x05QUERY\x10\x03\x12\n\n\x06\x43REATE\x10\x04\x42\x08\n\x06\x64\x65tail\"\xba\x07\n\x0fGovernanceEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12G\n\nevent_type\x18\x02 \x01(\x0e\x32\x33.google.cloud.dataplex.v1.GovernanceEvent.EventType\x12\x45\n\x06\x65ntity\x18\x03 \x01(\x0b\x32\x30.google.cloud.dataplex.v1.GovernanceEvent.EntityH\x00\x88\x01\x01\x1a\xd2\x01\n\x06\x45ntity\x12\x33\n\x06\x65ntity\x18\x01 \x01(\tB#\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12P\n\x0b\x65ntity_type\x18\x02 \x01(\x0e\x32;.google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType\"A\n\nEntityType\x12\x1b\n\x17\x45NTITY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02\"\xa5\x04\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aRESOURCE_IAM_POLICY_UPDATE\x10\x01\x12\x19\n\x15\x42IGQUERY_TABLE_CREATE\x10\x02\x12\x19\n\x15\x42IGQUERY_TABLE_UPDATE\x10\x03\x12\x19\n\x15\x42IGQUERY_TABLE_DELETE\x10\x04\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_CREATE\x10\x05\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_UPDATE\x10\x06\x12\x1e\n\x1a\x42IGQUERY_CONNECTION_DELETE\x10\x07\x12\x1c\n\x18\x42IGQUERY_TAXONOMY_CREATE\x10\n\x12\x1e\n\x1a\x42IGQUERY_POLICY_TAG_CREATE\x10\x0b\x12\x1e\n\x1a\x42IGQUERY_POLICY_TAG_DELETE\x10\x0c\x12&\n\"BIGQUERY_POLICY_TAG_SET_IAM_POLICY\x10\r\x12\x18\n\x14\x41\x43\x43\x45SS_POLICY_UPDATE\x10\x0e\x12%\n!GOVERNANCE_RULE_MATCHED_RESOURCES\x10\x0f\x12(\n$GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS\x10\x10\x12\x1a\n\x16GOVERNANCE_RULE_ERRORS\x10\x11\x12\x1e\n\x1aGOVERNANCE_RULE_PROCESSING\x10\x12\x42\t\n\x07_entity\"\xf3\x12\n\rDataScanEvent\x12\x13\n\x0b\x64\x61ta_source\x18\x01 \x01(\t\x12\x0e\n\x06job_id\x18\x02 \x01(\t\x12/\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12>\n\x04type\x18\x05 \x01(\x0e\x32\x30.google.cloud.dataplex.v1.DataScanEvent.ScanType\x12<\n\x05state\x18\x06 \x01(\x0e\x32-.google.cloud.dataplex.v1.DataScanEvent.State\x12\x0f\n\x07message\x18\x07 \x01(\t\x12\x14\n\x0cspec_version\x18\x08 \x01(\t\x12@\n\x07trigger\x18\t \x01(\x0e\x32/.google.cloud.dataplex.v1.DataScanEvent.Trigger\x12<\n\x05scope\x18\n \x01(\x0e\x32-.google.cloud.dataplex.v1.DataScanEvent.Scope\x12Q\n\x0c\x64\x61ta_profile\x18\x65 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultH\x00\x12Q\n\x0c\x64\x61ta_quality\x18\x66 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultH\x00\x12\x62\n\x14\x64\x61ta_profile_configs\x18\xc9\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigsH\x01\x12\x62\n\x14\x64\x61ta_quality_configs\x18\xca\x01 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigsH\x01\x12_\n\x18post_scan_actions_result\x18\x0b \x01(\x0b\x32=.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult\x1a&\n\x11\x44\x61taProfileResult\x12\x11\n\trow_count\x18\x01 \x01(\x03\x1a\x9c\x04\n\x11\x44\x61taQualityResult\x12\x11\n\trow_count\x18\x01 \x01(\x03\x12\x0e\n\x06passed\x18\x02 \x01(\x08\x12h\n\x10\x64imension_passed\x18\x03 \x03(\x0b\x32N.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.DimensionPassedEntry\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x66\n\x0f\x64imension_score\x18\x05 \x03(\x0b\x32M.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.DimensionScoreEntry\x12`\n\x0c\x63olumn_score\x18\x06 \x03(\x0b\x32J.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.ColumnScoreEntry\x1a\x36\n\x14\x44imensionPassedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\x35\n\x13\x44imensionScoreEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1a\x32\n\x10\x43olumnScoreEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1ap\n\x19\x44\x61taProfileAppliedConfigs\x12\x18\n\x10sampling_percent\x18\x01 \x01(\x02\x12\x1a\n\x12row_filter_applied\x18\x02 \x01(\x08\x12\x1d\n\x15\x63olumn_filter_applied\x18\x03 \x01(\x08\x1aQ\n\x19\x44\x61taQualityAppliedConfigs\x12\x18\n\x10sampling_percent\x18\x01 \x01(\x02\x12\x1a\n\x12row_filter_applied\x18\x02 \x01(\x08\x1a\xe6\x02\n\x15PostScanActionsResult\x12r\n\x16\x62igquery_export_result\x18\x01 \x01(\x0b\x32R.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult\x1a\xd8\x01\n\x14\x42igQueryExportResult\x12g\n\x05state\x18\x01 \x01(\x0e\x32X.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State\x12\x0f\n\x07message\x18\x02 \x01(\t\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0b\n\x07SKIPPED\x10\x03\"I\n\x08ScanType\x12\x19\n\x15SCAN_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x44\x41TA_PROFILE\x10\x01\x12\x10\n\x0c\x44\x41TA_QUALITY\x10\x02\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x12\x0b\n\x07\x43REATED\x10\x05\"?\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\x0c\n\x08SCHEDULE\x10\x02\"9\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\x0f\n\x0bINCREMENTAL\x10\x02\x42\x08\n\x06resultB\x10\n\x0e\x61ppliedConfigs\"\x99\x07\n\x19\x44\x61taQualityScanRuleResult\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x61ta_source\x18\x02 \x01(\t\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\t\x12\x11\n\trule_name\x18\x04 \x01(\t\x12O\n\trule_type\x18\x05 \x01(\x0e\x32<.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType\x12Z\n\x0e\x65valution_type\x18\x06 \x01(\x0e\x32\x42.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType\x12\x16\n\x0erule_dimension\x18\x07 \x01(\t\x12\x19\n\x11threshold_percent\x18\x08 \x01(\x01\x12J\n\x06result\x18\t \x01(\x0e\x32:.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result\x12\x1b\n\x13\x65valuated_row_count\x18\n \x01(\x03\x12\x18\n\x10passed_row_count\x18\x0b \x01(\x03\x12\x16\n\x0enull_row_count\x18\x0c \x01(\x03\x12\x1b\n\x13\x61ssertion_row_count\x18\r \x01(\x03\"\x92\x02\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14NON_NULL_EXPECTATION\x10\x01\x12\x15\n\x11RANGE_EXPECTATION\x10\x02\x12\x15\n\x11REGEX_EXPECTATION\x10\x03\x12\x1d\n\x19ROW_CONDITION_EXPECTATION\x10\x04\x12\x13\n\x0fSET_EXPECTATION\x10\x05\x12\x1f\n\x1bSTATISTIC_RANGE_EXPECTATION\x10\x06\x12\x1f\n\x1bTABLE_CONDITION_EXPECTATION\x10\x07\x12\x1a\n\x16UNIQUENESS_EXPECTATION\x10\x08\x12\x11\n\rSQL_ASSERTION\x10\t\"M\n\x0e\x45valuationType\x12\x1f\n\x1b\x45VALUATION_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PER_ROW\x10\x01\x12\r\n\tAGGREGATE\x10\x02\"8\n\x06Result\x12\x16\n\x12RESULT_UNSPECIFIED\x10\x00\x12\n\n\x06PASSED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x42\x65\n\x1c\x63om.google.cloud.dataplex.v1B\tLogsProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - DiscoveryEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent").msgclass - DiscoveryEvent::ConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails").msgclass - DiscoveryEvent::EntityDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails").msgclass - DiscoveryEvent::PartitionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails").msgclass - DiscoveryEvent::ActionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails").msgclass - DiscoveryEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EventType").enummodule - DiscoveryEvent::EntityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EntityType").enummodule - JobEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent").msgclass - JobEvent::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.Type").enummodule - JobEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.State").enummodule - JobEvent::Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.Service").enummodule - JobEvent::ExecutionTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.ExecutionTrigger").enummodule - SessionEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent").msgclass - SessionEvent::QueryDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.QueryDetail").msgclass - SessionEvent::QueryDetail::Engine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine").enummodule - SessionEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.EventType").enummodule - GovernanceEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent").msgclass - GovernanceEvent::Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.Entity").msgclass - GovernanceEvent::Entity::EntityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType").enummodule - GovernanceEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.EventType").enummodule - DataScanEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent").msgclass - DataScanEvent::DataProfileResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataProfileResult").msgclass - DataScanEvent::DataQualityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataQualityResult").msgclass - DataScanEvent::DataProfileAppliedConfigs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs").msgclass - DataScanEvent::DataQualityAppliedConfigs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs").msgclass - DataScanEvent::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult").msgclass - DataScanEvent::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult").msgclass - DataScanEvent::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State").enummodule - DataScanEvent::ScanType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.ScanType").enummodule - DataScanEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.State").enummodule - DataScanEvent::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.Trigger").enummodule - DataScanEvent::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.Scope").enummodule - DataQualityScanRuleResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult").msgclass - DataQualityScanRuleResult::RuleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType").enummodule - DataQualityScanRuleResult::EvaluationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType").enummodule - DataQualityScanRuleResult::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.Result").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb deleted file mode 100644 index 9f92bf741053..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/metadata.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\'google/cloud/dataplex/v1/metadata.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9e\x01\n\x13\x43reateEntityRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x35\n\x06\x65ntity\x18\x03 \x01(\x0b\x32 .google.cloud.dataplex.v1.EntityB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"h\n\x13UpdateEntityRequest\x12\x35\n\x06\x65ntity\x18\x02 \x01(\x0b\x32 .google.cloud.dataplex.v1.EntityB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"^\n\x13\x44\x65leteEntityRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xa3\x02\n\x13ListEntitiesRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12K\n\x04view\x18\x02 \x01(\x0e\x32\x38.google.cloud.dataplex.v1.ListEntitiesRequest.EntityViewB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"C\n\nEntityView\x12\x1b\n\x17\x45NTITY_VIEW_UNSPECIFIED\x10\x00\x12\n\n\x06TABLES\x10\x01\x12\x0c\n\x08\x46ILESETS\x10\x02\"c\n\x14ListEntitiesResponse\x12\x32\n\x08\x65ntities\x18\x01 \x03(\x0b\x32 .google.cloud.dataplex.v1.Entity\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xde\x01\n\x10GetEntityRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12H\n\x04view\x18\x02 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.GetEntityRequest.EntityViewB\x03\xe0\x41\x01\"J\n\nEntityView\x12\x1b\n\x17\x45NTITY_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\n\n\x06SCHEMA\x10\x02\x12\x08\n\x04\x46ULL\x10\x04\"\x95\x01\n\x15ListPartitionsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa9\x01\n\x16\x43reatePartitionRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12;\n\tpartition\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.PartitionB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x16\x44\x65letePartitionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/Partition\x12\x13\n\x04\x65tag\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x01\"j\n\x16ListPartitionsResponse\x12\x37\n\npartitions\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.Partition\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x13GetPartitionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/Partition\"\xc9\t\n\x06\x45ntity\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12;\n\x04type\x18\n \x01(\x0e\x32%.google.cloud.dataplex.v1.Entity.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x15\n\x05\x61sset\x18\x0b \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x19\n\tdata_path\x18\x0c \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1e\n\x11\x64\x61ta_path_pattern\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rcatalog_entry\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12?\n\x06system\x18\x0f \x01(\x0e\x32\'.google.cloud.dataplex.v1.StorageSystemB\x06\xe0\x41\x02\xe0\x41\x05\x12<\n\x06\x66ormat\x18\x10 \x01(\x0b\x32\'.google.cloud.dataplex.v1.StorageFormatB\x03\xe0\x41\x02\x12P\n\rcompatibility\x18\x13 \x01(\x0b\x32\x34.google.cloud.dataplex.v1.Entity.CompatibilityStatusB\x03\xe0\x41\x03\x12<\n\x06\x61\x63\x63\x65ss\x18\x15 \x01(\x0b\x32\'.google.cloud.dataplex.v1.StorageAccessB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12\x35\n\x06schema\x18\x32 \x01(\x0b\x32 .google.cloud.dataplex.v1.SchemaB\x03\xe0\x41\x02\x1a\x90\x02\n\x13\x43ompatibilityStatus\x12_\n\x0ehive_metastore\x18\x01 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.Entity.CompatibilityStatus.CompatibilityB\x03\xe0\x41\x03\x12Y\n\x08\x62igquery\x18\x02 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.Entity.CompatibilityStatus.CompatibilityB\x03\xe0\x41\x03\x1a=\n\rCompatibility\x12\x17\n\ncompatible\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x03\"4\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02:x\xea\x41u\n\x1e\x64\x61taplex.googleapis.com/Entity\x12Sprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}\"\xa1\x02\n\tPartition\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!dataplex.googleapis.com/Partition\x12\x16\n\x06values\x18\x02 \x03(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x08location\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x13\n\x04\x65tag\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x01:\x93\x01\xea\x41\x8f\x01\n!dataplex.googleapis.com/Partition\x12jprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}\"\xb7\x07\n\x06Schema\x12\x19\n\x0cuser_managed\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x41\n\x06\x66ields\x18\x02 \x03(\x0b\x32,.google.cloud.dataplex.v1.Schema.SchemaFieldB\x03\xe0\x41\x01\x12N\n\x10partition_fields\x18\x03 \x03(\x0b\x32/.google.cloud.dataplex.v1.Schema.PartitionFieldB\x03\xe0\x41\x01\x12M\n\x0fpartition_style\x18\x04 \x01(\x0e\x32/.google.cloud.dataplex.v1.Schema.PartitionStyleB\x03\xe0\x41\x01\x1a\xf1\x01\n\x0bSchemaField\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\x04type\x18\x03 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.TypeB\x03\xe0\x41\x02\x12\x38\n\x04mode\x18\x04 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.ModeB\x03\xe0\x41\x02\x12\x41\n\x06\x66ields\x18\n \x03(\x0b\x32,.google.cloud.dataplex.v1.Schema.SchemaFieldB\x03\xe0\x41\x01\x1a`\n\x0ePartitionField\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\x04type\x18\x02 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.TypeB\x06\xe0\x41\x02\xe0\x41\x05\"\xc9\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x42OOLEAN\x10\x01\x12\x08\n\x04\x42YTE\x10\x02\x12\t\n\x05INT16\x10\x03\x12\t\n\x05INT32\x10\x04\x12\t\n\x05INT64\x10\x05\x12\t\n\x05\x46LOAT\x10\x06\x12\n\n\x06\x44OUBLE\x10\x07\x12\x0b\n\x07\x44\x45\x43IMAL\x10\x08\x12\n\n\x06STRING\x10\t\x12\n\n\x06\x42INARY\x10\n\x12\r\n\tTIMESTAMP\x10\x0b\x12\x08\n\x04\x44\x41TE\x10\x0c\x12\x08\n\x04TIME\x10\r\x12\n\n\x06RECORD\x10\x0e\x12\x08\n\x04NULL\x10\x64\"F\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08REQUIRED\x10\x01\x12\x0c\n\x08NULLABLE\x10\x02\x12\x0c\n\x08REPEATED\x10\x03\"F\n\x0ePartitionStyle\x12\x1f\n\x1bPARTITION_STYLE_UNSPECIFIED\x10\x00\x12\x13\n\x0fHIVE_COMPATIBLE\x10\x01\"\xf4\x06\n\rStorageFormat\x12\x43\n\x06\x66ormat\x18\x01 \x01(\x0e\x32..google.cloud.dataplex.v1.StorageFormat.FormatB\x03\xe0\x41\x03\x12Z\n\x12\x63ompression_format\x18\x02 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.StorageFormat.CompressionFormatB\x03\xe0\x41\x01\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x03\x63sv\x18\n \x01(\x0b\x32\x32.google.cloud.dataplex.v1.StorageFormat.CsvOptionsB\x03\xe0\x41\x01H\x00\x12H\n\x04json\x18\x0b \x01(\x0b\x32\x33.google.cloud.dataplex.v1.StorageFormat.JsonOptionsB\x03\xe0\x41\x01H\x00\x12N\n\x07iceberg\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.StorageFormat.IcebergOptionsB\x03\xe0\x41\x01H\x00\x1ai\n\nCsvOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bheader_rows\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05quote\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x30\n\x0eIcebergOptions\x12\x1e\n\x11metadata_location\x18\x01 \x01(\tB\x03\xe0\x41\x01\"\xab\x01\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x0b\n\x07PARQUET\x10\x01\x12\x08\n\x04\x41VRO\x10\x02\x12\x07\n\x03ORC\x10\x03\x12\x07\n\x03\x43SV\x10\x64\x12\x08\n\x04JSON\x10\x65\x12\n\n\x05IMAGE\x10\xc8\x01\x12\n\n\x05\x41UDIO\x10\xc9\x01\x12\n\n\x05VIDEO\x10\xca\x01\x12\t\n\x04TEXT\x10\xcb\x01\x12\r\n\x08TFRECORD\x10\xcc\x01\x12\n\n\x05OTHER\x10\xe8\x07\x12\x0c\n\x07UNKNOWN\x10\xe9\x07\"L\n\x11\x43ompressionFormat\x12\"\n\x1e\x43OMPRESSION_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04GZIP\x10\x02\x12\t\n\x05\x42ZIP2\x10\x03\x42\t\n\x07options\"\x9a\x01\n\rStorageAccess\x12\x45\n\x04read\x18\x15 \x01(\x0e\x32\x32.google.cloud.dataplex.v1.StorageAccess.AccessModeB\x03\xe0\x41\x03\"B\n\nAccessMode\x12\x1b\n\x17\x41\x43\x43\x45SS_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44IRECT\x10\x01\x12\x0b\n\x07MANAGED\x10\x02*P\n\rStorageSystem\x12\x1e\n\x1aSTORAGE_SYSTEM_UNSPECIFIED\x10\x00\x12\x11\n\rCLOUD_STORAGE\x10\x01\x12\x0c\n\x08\x42IGQUERY\x10\x02\x32\x89\x0e\n\x0fMetadataService\x12\xbd\x01\n\x0c\x43reateEntity\x12-.google.cloud.dataplex.v1.CreateEntityRequest\x1a .google.cloud.dataplex.v1.Entity\"\\\xda\x41\rparent,entity\x82\xd3\xe4\x93\x02\x46\"*\x12\x12 e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a metadata entity. Only supports full resource update. - # - # @overload update_entity(request, options = nil) - # Pass arguments to `update_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_entity(entity: nil, validate_only: nil) - # Pass arguments to `update_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] - # Required. Update description. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new - # - # # Call the update_entity method. - # result = client.update_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def update_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_entity.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.entity&.name - header_params["entity.name"] = request.entity.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_entity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :update_entity, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a metadata entity. - # - # @overload delete_entity(request, options = nil) - # Pass arguments to `delete_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_entity(name: nil, etag: nil) - # Pass arguments to `delete_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param etag [::String] - # Required. The etag associated with the entity, which can be retrieved with - # a [GetEntity][] request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new - # - # # Call the delete_entity method. - # result = client.delete_entity request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_entity.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_entity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :delete_entity, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a metadata entity. - # - # @overload get_entity(request, options = nil) - # Pass arguments to `get_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_entity(name: nil, view: nil) - # Pass arguments to `get_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - # @param view [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] - # Optional. Used to select the subset of entity information to return. - # Defaults to `BASIC`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntityRequest.new - # - # # Call the get_entity method. - # result = client.get_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def get_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_entity.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_entity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :get_entity, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List metadata entities in a zone. - # - # @overload list_entities(request, options = nil) - # Pass arguments to `list_entities` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntitiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_entities` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param view [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] - # Required. Specify the entity view to make a partial list request. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new - # - # # Call the list_entities method. - # result = client.list_entities request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. - # p item - # end - # - def list_entities request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntitiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_entities.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_entities.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_entities.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :list_entities, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @metadata_service_stub, :list_entities, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a metadata partition. - # - # @overload create_partition(request, options = nil) - # Pass arguments to `create_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreatePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_partition(parent: nil, partition: nil, validate_only: nil) - # Pass arguments to `create_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param partition [::Google::Cloud::Dataplex::V1::Partition, ::Hash] - # Required. Partition resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new - # - # # Call the create_partition method. - # result = client.create_partition request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - # p result - # - def create_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreatePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_partition.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_partition.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :create_partition, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a metadata partition. - # - # @overload delete_partition(request, options = nil) - # Pass arguments to `delete_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeletePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_partition(name: nil, etag: nil) - # Pass arguments to `delete_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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 etag [::String] - # Optional. The etag associated with the partition. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new - # - # # Call the delete_partition method. - # result = client.delete_partition request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeletePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_partition.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_partition.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :delete_partition, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a metadata partition of an entity. - # - # @overload get_partition(request, options = nil) - # Pass arguments to `get_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetPartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_partition(name: nil) - # Pass arguments to `get_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new - # - # # Call the get_partition method. - # result = client.get_partition request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - # p result - # - def get_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetPartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_partition.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_partition.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :get_partition, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List metadata partitions of an entity. - # - # @overload list_partitions(request, options = nil) - # Pass arguments to `list_partitions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListPartitionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_partitions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new - # - # # Call the list_partitions method. - # result = client.list_partitions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. - # p item - # end - # - def list_partitions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListPartitionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_partitions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_partitions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_partitions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :list_partitions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @metadata_service_stub, :list_partitions, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the MetadataService API. - # - # This class represents the configuration for MetadataService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::MetadataService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_entity to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::MetadataService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_entity.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_entity.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the MetadataService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entity - ## - # RPC-specific configuration for `update_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entity - ## - # RPC-specific configuration for `delete_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entity - ## - # RPC-specific configuration for `get_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entity - ## - # RPC-specific configuration for `list_entities` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entities - ## - # RPC-specific configuration for `create_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :create_partition - ## - # RPC-specific configuration for `delete_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_partition - ## - # RPC-specific configuration for `get_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :get_partition - ## - # RPC-specific configuration for `list_partitions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_partitions - - # @private - def initialize parent_rpcs = nil - create_entity_config = parent_rpcs.create_entity if parent_rpcs.respond_to? :create_entity - @create_entity = ::Gapic::Config::Method.new create_entity_config - update_entity_config = parent_rpcs.update_entity if parent_rpcs.respond_to? :update_entity - @update_entity = ::Gapic::Config::Method.new update_entity_config - delete_entity_config = parent_rpcs.delete_entity if parent_rpcs.respond_to? :delete_entity - @delete_entity = ::Gapic::Config::Method.new delete_entity_config - get_entity_config = parent_rpcs.get_entity if parent_rpcs.respond_to? :get_entity - @get_entity = ::Gapic::Config::Method.new get_entity_config - list_entities_config = parent_rpcs.list_entities if parent_rpcs.respond_to? :list_entities - @list_entities = ::Gapic::Config::Method.new list_entities_config - create_partition_config = parent_rpcs.create_partition if parent_rpcs.respond_to? :create_partition - @create_partition = ::Gapic::Config::Method.new create_partition_config - delete_partition_config = parent_rpcs.delete_partition if parent_rpcs.respond_to? :delete_partition - @delete_partition = ::Gapic::Config::Method.new delete_partition_config - get_partition_config = parent_rpcs.get_partition if parent_rpcs.respond_to? :get_partition - @get_partition = ::Gapic::Config::Method.new get_partition_config - list_partitions_config = parent_rpcs.list_partitions if parent_rpcs.respond_to? :list_partitions - @list_partitions = ::Gapic::Config::Method.new list_partitions_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb deleted file mode 100644 index ebb897d11c17..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module MetadataService - # Credentials for the MetadataService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb deleted file mode 100644 index f17baadf07d2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb +++ /dev/null @@ -1,102 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - module MetadataService - # Path helper methods for the MetadataService API. - module Paths - ## - # Create a fully-qualified Entity resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # @param entity [String] - # - # @return [::String] - def entity_path project:, location:, lake:, zone:, entity: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}" - end - - ## - # Create a fully-qualified Partition resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # @param entity [String] - # @param partition [String] - # - # @return [::String] - def partition_path project:, location:, lake:, zone:, entity:, partition: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - raise ::ArgumentError, "entity cannot contain /" if entity.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}/partitions/#{partition}" - end - - ## - # Create a fully-qualified Zone resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # - # @return [::String] - def zone_path project:, location:, lake:, zone: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb deleted file mode 100644 index 27a710ff906d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/metadata_service/credentials" -require "google/cloud/dataplex/v1/metadata_service/paths" -require "google/cloud/dataplex/v1/metadata_service/rest/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # Metadata service manages metadata resources such as tables, filesets and - # partitions. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/metadata_service/rest" - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - module MetadataService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/metadata_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb deleted file mode 100644 index ae31aa2694a6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb +++ /dev/null @@ -1,1233 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/dataplex/v1/metadata_pb" -require "google/cloud/dataplex/v1/metadata_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module MetadataService - module Rest - ## - # REST client for the MetadataService service. - # - # Metadata service manages metadata resources such as tables, filesets and - # partitions. - # - class Client - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :metadata_service_stub - - ## - # Configure the MetadataService Client class. - # - # See {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all MetadataService clients - # ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_entity.timeout = 60.0 - - default_config.rpcs.update_entity.timeout = 60.0 - - default_config.rpcs.delete_entity.timeout = 60.0 - - default_config.rpcs.get_entity.timeout = 60.0 - default_config.rpcs.get_entity.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_entities.timeout = 60.0 - default_config.rpcs.list_entities.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_partition.timeout = 60.0 - - default_config.rpcs.delete_partition.timeout = 60.0 - - default_config.rpcs.get_partition.timeout = 60.0 - default_config.rpcs.get_partition.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_partitions.timeout = 60.0 - default_config.rpcs.list_partitions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the MetadataService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @metadata_service_stub.universe_domain - end - - ## - # Create a new MetadataService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the MetadataService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @metadata_service_stub = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @metadata_service_stub.endpoint - config.universe_domain = @metadata_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @metadata_service_stub.endpoint - config.universe_domain = @metadata_service_stub.universe_domain - config.bindings_override = @config.bindings_override - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - # Service calls - - ## - # Create a metadata entity. - # - # @overload create_entity(request, options = nil) - # Pass arguments to `create_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_entity(parent: nil, entity: nil, validate_only: nil) - # Pass arguments to `create_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] - # Required. Entity resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntityRequest.new - # - # # Call the create_entity method. - # result = client.create_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def create_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_entity.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_entity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.create_entity request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a metadata entity. Only supports full resource update. - # - # @overload update_entity(request, options = nil) - # Pass arguments to `update_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_entity(entity: nil, validate_only: nil) - # Pass arguments to `update_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] - # Required. Update description. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new - # - # # Call the update_entity method. - # result = client.update_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def update_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_entity.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_entity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.update_entity request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a metadata entity. - # - # @overload delete_entity(request, options = nil) - # Pass arguments to `delete_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_entity(name: nil, etag: nil) - # Pass arguments to `delete_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param etag [::String] - # Required. The etag associated with the entity, which can be retrieved with - # a [GetEntity][] request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new - # - # # Call the delete_entity method. - # result = client.delete_entity request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_entity.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_entity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.delete_entity request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a metadata entity. - # - # @overload get_entity(request, options = nil) - # Pass arguments to `get_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_entity(name: nil, view: nil) - # Pass arguments to `get_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - # @param view [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] - # Optional. Used to select the subset of entity information to return. - # Defaults to `BASIC`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntityRequest.new - # - # # Call the get_entity method. - # result = client.get_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def get_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_entity.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_entity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.get_entity request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List metadata entities in a zone. - # - # @overload list_entities(request, options = nil) - # Pass arguments to `list_entities` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntitiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_entities` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param view [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] - # Required. Specify the entity view to make a partial list request. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new - # - # # Call the list_entities method. - # result = client.list_entities request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. - # p item - # end - # - def list_entities request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntitiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_entities.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_entities.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_entities.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.list_entities request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_entities, "entities", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a metadata partition. - # - # @overload create_partition(request, options = nil) - # Pass arguments to `create_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreatePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_partition(parent: nil, partition: nil, validate_only: nil) - # Pass arguments to `create_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param partition [::Google::Cloud::Dataplex::V1::Partition, ::Hash] - # Required. Partition resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new - # - # # Call the create_partition method. - # result = client.create_partition request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - # p result - # - def create_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreatePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_partition.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_partition.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.create_partition request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a metadata partition. - # - # @overload delete_partition(request, options = nil) - # Pass arguments to `delete_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeletePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_partition(name: nil, etag: nil) - # Pass arguments to `delete_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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 etag [::String] - # Optional. The etag associated with the partition. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new - # - # # Call the delete_partition method. - # result = client.delete_partition request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeletePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_partition.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_partition.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.delete_partition request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a metadata partition of an entity. - # - # @overload get_partition(request, options = nil) - # Pass arguments to `get_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetPartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_partition(name: nil) - # Pass arguments to `get_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new - # - # # Call the get_partition method. - # result = client.get_partition request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - # p result - # - def get_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetPartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_partition.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_partition.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.get_partition request, options do |result, operation| - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List metadata partitions of an entity. - # - # @overload list_partitions(request, options = nil) - # Pass arguments to `list_partitions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListPartitionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_partitions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param page_size [::Integer] - # 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 page_token [::String] - # 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 filter [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new - # - # # Call the list_partitions method. - # result = client.list_partitions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. - # p item - # end - # - def list_partitions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListPartitionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_partitions.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_partitions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_partitions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.list_partitions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_partitions, "partitions", request, result, options - yield result, operation if block_given? - return result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the MetadataService REST API. - # - # This class represents the configuration for MetadataService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_entity to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_entity.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_entity.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "dataplex.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the MetadataService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entity - ## - # RPC-specific configuration for `update_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entity - ## - # RPC-specific configuration for `delete_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entity - ## - # RPC-specific configuration for `get_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entity - ## - # RPC-specific configuration for `list_entities` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entities - ## - # RPC-specific configuration for `create_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :create_partition - ## - # RPC-specific configuration for `delete_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_partition - ## - # RPC-specific configuration for `get_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :get_partition - ## - # RPC-specific configuration for `list_partitions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_partitions - - # @private - def initialize parent_rpcs = nil - create_entity_config = parent_rpcs.create_entity if parent_rpcs.respond_to? :create_entity - @create_entity = ::Gapic::Config::Method.new create_entity_config - update_entity_config = parent_rpcs.update_entity if parent_rpcs.respond_to? :update_entity - @update_entity = ::Gapic::Config::Method.new update_entity_config - delete_entity_config = parent_rpcs.delete_entity if parent_rpcs.respond_to? :delete_entity - @delete_entity = ::Gapic::Config::Method.new delete_entity_config - get_entity_config = parent_rpcs.get_entity if parent_rpcs.respond_to? :get_entity - @get_entity = ::Gapic::Config::Method.new get_entity_config - list_entities_config = parent_rpcs.list_entities if parent_rpcs.respond_to? :list_entities - @list_entities = ::Gapic::Config::Method.new list_entities_config - create_partition_config = parent_rpcs.create_partition if parent_rpcs.respond_to? :create_partition - @create_partition = ::Gapic::Config::Method.new create_partition_config - delete_partition_config = parent_rpcs.delete_partition if parent_rpcs.respond_to? :delete_partition - @delete_partition = ::Gapic::Config::Method.new delete_partition_config - get_partition_config = parent_rpcs.get_partition if parent_rpcs.respond_to? :get_partition - @get_partition = ::Gapic::Config::Method.new get_partition_config - list_partitions_config = parent_rpcs.list_partitions if parent_rpcs.respond_to? :list_partitions - @list_partitions = ::Gapic::Config::Method.new list_partitions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb deleted file mode 100644 index 6c1684ce4a3c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb +++ /dev/null @@ -1,603 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/metadata_pb" - -module Google - module Cloud - module Dataplex - module V1 - module MetadataService - module Rest - ## - # REST service stub for the MetadataService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - raise_faraday_errors: false - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # Baseline implementation for the create_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # A result object deserialized from the server's reply - def create_entity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_entity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entity.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the update_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # A result object deserialized from the server's reply - def update_entity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_entity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entity.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_entity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_entity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # A result object deserialized from the server's reply - def get_entity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_entity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entity.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_entities REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntitiesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntitiesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntitiesResponse] - # A result object deserialized from the server's reply - def list_entities request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_entities_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the create_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreatePartitionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # A result object deserialized from the server's reply - def create_partition request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_partition_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Partition.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the delete_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeletePartitionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_partition request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_partition_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the get_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetPartitionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # A result object deserialized from the server's reply - def get_partition request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_partition_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Partition.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # Baseline implementation for the list_partitions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListPartitionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListPartitionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListPartitionsResponse] - # A result object deserialized from the server's reply - def list_partitions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_partitions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.decode_json response.body, ignore_unknown_fields: true - - yield result, operation if block_given? - result - end - - ## - # @private - # - # GRPC transcoding helper method for the create_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_entity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/entities", - body: "entity", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_entity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1/{entity.name}", - body: "entity", - matches: [ - ["entity.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_entity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_entity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_entities REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntitiesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_entities_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/entities", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreatePartitionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_partition_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/partitions", - body: "partition", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeletePartitionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_partition_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetPartitionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_partition_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_partitions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListPartitionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_partitions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/partitions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb deleted file mode 100644 index 216f643b2c64..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/metadata.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# - -require 'grpc' -require 'google/cloud/dataplex/v1/metadata_pb' - -module Google - module Cloud - module Dataplex - module V1 - module MetadataService - # Metadata service manages metadata resources such as tables, filesets and - # partitions. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.MetadataService' - - # Create a metadata entity. - rpc :CreateEntity, ::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Google::Cloud::Dataplex::V1::Entity - # Update a metadata entity. Only supports full resource update. - rpc :UpdateEntity, ::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Google::Cloud::Dataplex::V1::Entity - # Delete a metadata entity. - rpc :DeleteEntity, ::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Google::Protobuf::Empty - # Get a metadata entity. - rpc :GetEntity, ::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Google::Cloud::Dataplex::V1::Entity - # List metadata entities in a zone. - rpc :ListEntities, ::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Google::Cloud::Dataplex::V1::ListEntitiesResponse - # Create a metadata partition. - rpc :CreatePartition, ::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Google::Cloud::Dataplex::V1::Partition - # Delete a metadata partition. - rpc :DeletePartition, ::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Google::Protobuf::Empty - # Get a metadata partition of an entity. - rpc :GetPartition, ::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Google::Cloud::Dataplex::V1::Partition - # List metadata partitions of an entity. - rpc :ListPartitions, ::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Google::Cloud::Dataplex::V1::ListPartitionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb deleted file mode 100644 index 49ecd409bebe..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/processing.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n)google/cloud/dataplex/v1/processing.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xbd\x01\n\x07Trigger\x12?\n\ton_demand\x18\x64 \x01(\x0b\x32*.google.cloud.dataplex.v1.Trigger.OnDemandH\x00\x12>\n\x08schedule\x18\x65 \x01(\x0b\x32*.google.cloud.dataplex.v1.Trigger.ScheduleH\x00\x1a\n\n\x08OnDemand\x1a\x1d\n\x08Schedule\x12\x11\n\x04\x63ron\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x06\n\x04mode\"i\n\nDataSource\x12\x38\n\x06\x65ntity\x18\x64 \x01(\tB&\xe0\x41\x05\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/EntityH\x00\x12\x17\n\x08resource\x18\x65 \x01(\tB\x03\xe0\x41\x05H\x00\x42\x08\n\x06source\"\xaf\x01\n\x0bScannedData\x12S\n\x11incremental_field\x18\x01 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.ScannedData.IncrementalFieldH\x00\x1a=\n\x10IncrementalField\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\r\n\x05start\x18\x02 \x01(\t\x12\x0b\n\x03\x65nd\x18\x03 \x01(\tB\x0c\n\ndata_rangeBk\n\x1c\x63om.google.cloud.dataplex.v1B\x0fProcessingProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger").msgclass - Trigger::OnDemand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger.OnDemand").msgclass - Trigger::Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger.Schedule").msgclass - DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataSource").msgclass - ScannedData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ScannedData").msgclass - ScannedData::IncrementalField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ScannedData.IncrementalField").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb deleted file mode 100644 index 9588f77a6f82..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n(google/cloud/dataplex/v1/resources.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfa\x07\n\x04Lake\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x06 \x03(\x0b\x32*.google.cloud.dataplex.v1.Lake.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x1c\n\x0fservice_account\x18\t \x01(\tB\x03\xe0\x41\x03\x12@\n\tmetastore\x18\x66 \x01(\x0b\x32(.google.cloud.dataplex.v1.Lake.MetastoreB\x03\xe0\x41\x01\x12@\n\x0c\x61sset_status\x18g \x01(\x0b\x32%.google.cloud.dataplex.v1.AssetStatusB\x03\xe0\x41\x03\x12M\n\x10metastore_status\x18h \x01(\x0b\x32..google.cloud.dataplex.v1.Lake.MetastoreStatusB\x03\xe0\x41\x03\x1a!\n\tMetastore\x12\x14\n\x07service\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xf8\x01\n\x0fMetastoreStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Lake.MetastoreStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x65ndpoint\x18\x04 \x01(\t\"L\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:W\xea\x41T\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x34projects/{project}/locations/{location}/lakes/{lake}\"~\n\x0b\x41ssetStatus\x12/\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\ractive_assets\x18\x02 \x01(\x05\x12\'\n\x1fsecurity_policy_applying_assets\x18\x03 \x01(\x05\"\xf4\x0b\n\x04Zone\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x06 \x03(\x0b\x32*.google.cloud.dataplex.v1.Zone.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x39\n\x04type\x18\t \x01(\x0e\x32#.google.cloud.dataplex.v1.Zone.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12I\n\x0e\x64iscovery_spec\x18g \x01(\x0b\x32,.google.cloud.dataplex.v1.Zone.DiscoverySpecB\x03\xe0\x41\x01\x12G\n\rresource_spec\x18h \x01(\x0b\x32+.google.cloud.dataplex.v1.Zone.ResourceSpecB\x03\xe0\x41\x02\x12@\n\x0c\x61sset_status\x18i \x01(\x0b\x32%.google.cloud.dataplex.v1.AssetStatusB\x03\xe0\x41\x03\x1a\xbb\x01\n\x0cResourceSpec\x12W\n\rlocation_type\x18\x01 \x01(\x0e\x32\x38.google.cloud.dataplex.v1.Zone.ResourceSpec.LocationTypeB\x06\xe0\x41\x02\xe0\x41\x05\"R\n\x0cLocationType\x12\x1d\n\x19LOCATION_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSINGLE_REGION\x10\x01\x12\x10\n\x0cMULTI_REGION\x10\x02\x1a\xf6\x03\n\rDiscoverySpec\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1d\n\x10include_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12Q\n\x0b\x63sv_options\x18\x04 \x01(\x0b\x32\x37.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptionsB\x03\xe0\x41\x01\x12S\n\x0cjson_options\x18\x05 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptionsB\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\n \x01(\tB\x03\xe0\x41\x01H\x00\x1az\n\nCsvOptions\x12\x18\n\x0bheader_rows\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\t\n\x07trigger\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03RAW\x10\x01\x12\x0b\n\x07\x43URATED\x10\x02:d\xea\x41\x61\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x41projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}\"\xab\x11\n\x06\x41\x63tion\x12;\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32).google.cloud.dataplex.v1.Action.Category\x12\r\n\x05issue\x18\x02 \x01(\t\x12/\n\x0b\x64\x65tect_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x04name\x18\x05 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Action\x12\x32\n\x04lake\x18\x06 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x32\n\x04zone\x18\x07 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x34\n\x05\x61sset\x18\x08 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x16\n\x0e\x64\x61ta_locations\x18\t \x03(\t\x12Q\n\x13invalid_data_format\x18\n \x01(\x0b\x32\x32.google.cloud.dataplex.v1.Action.InvalidDataFormatH\x00\x12[\n\x18incompatible_data_schema\x18\x0b \x01(\x0b\x32\x37.google.cloud.dataplex.v1.Action.IncompatibleDataSchemaH\x00\x12W\n\x16invalid_data_partition\x18\x0c \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Action.InvalidDataPartitionH\x00\x12\x44\n\x0cmissing_data\x18\r \x01(\x0b\x32,.google.cloud.dataplex.v1.Action.MissingDataH\x00\x12L\n\x10missing_resource\x18\x0e \x01(\x0b\x32\x30.google.cloud.dataplex.v1.Action.MissingResourceH\x00\x12V\n\x15unauthorized_resource\x18\x0f \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Action.UnauthorizedResourceH\x00\x12\x62\n\x1c\x66\x61iled_security_policy_apply\x18\x15 \x01(\x0b\x32:.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApplyH\x00\x12]\n\x19invalid_data_organization\x18\x16 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Action.InvalidDataOrganizationH\x00\x1a\x11\n\x0fMissingResource\x1a\x16\n\x14UnauthorizedResource\x1a*\n\x19\x46\x61iledSecurityPolicyApply\x12\r\n\x05\x61sset\x18\x01 \x01(\t\x1a`\n\x11InvalidDataFormat\x12\x1e\n\x16sampled_data_locations\x18\x01 \x03(\t\x12\x17\n\x0f\x65xpected_format\x18\x02 \x01(\t\x12\x12\n\nnew_format\x18\x03 \x01(\t\x1a\xa0\x02\n\x16IncompatibleDataSchema\x12\r\n\x05table\x18\x01 \x01(\t\x12\x17\n\x0f\x65xisting_schema\x18\x02 \x01(\t\x12\x12\n\nnew_schema\x18\x03 \x01(\t\x12\x1e\n\x16sampled_data_locations\x18\x04 \x03(\t\x12[\n\rschema_change\x18\x05 \x01(\x0e\x32\x44.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange\"M\n\x0cSchemaChange\x12\x1d\n\x19SCHEMA_CHANGE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINCOMPATIBLE\x10\x01\x12\x0c\n\x08MODIFIED\x10\x02\x1a\xe1\x01\n\x14InvalidDataPartition\x12\x64\n\x12\x65xpected_structure\x18\x01 \x01(\x0e\x32H.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure\"c\n\x12PartitionStructure\x12#\n\x1fPARTITION_STRUCTURE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43ONSISTENT_KEYS\x10\x01\x12\x13\n\x0fHIVE_STYLE_KEYS\x10\x02\x1a\r\n\x0bMissingData\x1a\x19\n\x17InvalidDataOrganization\"f\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x17\n\x13RESOURCE_MANAGEMENT\x10\x01\x12\x13\n\x0fSECURITY_POLICY\x10\x02\x12\x12\n\x0e\x44\x41TA_DISCOVERY\x10\x03:\xa2\x02\xea\x41\x9e\x02\n\x1e\x64\x61taplex.googleapis.com/Action\x12\x45projects/{project}/locations/{location}/lakes/{lake}/actions/{action}\x12Rprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}\x12\x61projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}B\t\n\x07\x64\x65tails\"\xa4\x15\n\x05\x41sset\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x06labels\x18\x06 \x03(\x0b\x32+.google.cloud.dataplex.v1.Asset.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12H\n\rresource_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.Asset.ResourceSpecB\x03\xe0\x41\x02\x12L\n\x0fresource_status\x18\x65 \x01(\x0b\x32..google.cloud.dataplex.v1.Asset.ResourceStatusB\x03\xe0\x41\x03\x12L\n\x0fsecurity_status\x18g \x01(\x0b\x32..google.cloud.dataplex.v1.Asset.SecurityStatusB\x03\xe0\x41\x03\x12J\n\x0e\x64iscovery_spec\x18j \x01(\x0b\x32-.google.cloud.dataplex.v1.Asset.DiscoverySpecB\x03\xe0\x41\x01\x12N\n\x10\x64iscovery_status\x18k \x01(\x0b\x32/.google.cloud.dataplex.v1.Asset.DiscoveryStatusB\x03\xe0\x41\x03\x1a\xdb\x01\n\x0eSecurityStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Asset.SecurityStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"B\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x41PPLYING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x1a\xf8\x03\n\rDiscoverySpec\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10include_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12R\n\x0b\x63sv_options\x18\x04 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptionsB\x03\xe0\x41\x01\x12T\n\x0cjson_options\x18\x05 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptionsB\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\n \x01(\tB\x03\xe0\x41\x01H\x00\x1az\n\nCsvOptions\x12\x18\n\x0bheader_rows\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\t\n\x07trigger\x1a\xce\x02\n\x0cResourceSpec\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12G\n\x04type\x18\x02 \x01(\x0e\x32\x31.google.cloud.dataplex.v1.Asset.ResourceSpec.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12V\n\x10read_access_mode\x18\x05 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessModeB\x03\xe0\x41\x01\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTORAGE_BUCKET\x10\x01\x12\x14\n\x10\x42IGQUERY_DATASET\x10\x02\"B\n\nAccessMode\x12\x1b\n\x17\x41\x43\x43\x45SS_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44IRECT\x10\x01\x12\x0b\n\x07MANAGED\x10\x02\x1a\xf3\x01\n\x0eResourceStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Asset.ResourceStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12$\n\x17managed_access_identity\x18\x04 \x01(\tB\x03\xe0\x41\x03\"4\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x1a\xf4\x03\n\x0f\x44iscoveryStatus\x12\x44\n\x05state\x18\x01 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_run_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x05stats\x18\x06 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats\x12\x34\n\x11last_run_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x1aP\n\x05Stats\x12\x12\n\ndata_items\x18\x01 \x01(\x03\x12\x11\n\tdata_size\x18\x02 \x01(\x03\x12\x0e\n\x06tables\x18\x03 \x01(\x03\x12\x10\n\x08\x66ilesets\x18\x04 \x01(\x03\"X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\x0c\n\x08\x44ISABLED\x10\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n\x1d\x64\x61taplex.googleapis.com/Asset\x12Pprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}*[\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x13\n\x0f\x41\x43TION_REQUIRED\x10\x04\x42j\n\x1c\x63om.google.cloud.dataplex.v1B\x0eResourcesProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - Lake = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake").msgclass - Lake::Metastore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.Metastore").msgclass - Lake::MetastoreStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.MetastoreStatus").msgclass - Lake::MetastoreStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.MetastoreStatus.State").enummodule - AssetStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AssetStatus").msgclass - Zone = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone").msgclass - Zone::ResourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.ResourceSpec").msgclass - Zone::ResourceSpec::LocationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType").enummodule - Zone::DiscoverySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec").msgclass - Zone::DiscoverySpec::CsvOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions").msgclass - Zone::DiscoverySpec::JsonOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions").msgclass - Zone::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.Type").enummodule - Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action").msgclass - Action::MissingResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.MissingResource").msgclass - Action::UnauthorizedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.UnauthorizedResource").msgclass - Action::FailedSecurityPolicyApply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply").msgclass - Action::InvalidDataFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataFormat").msgclass - Action::IncompatibleDataSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.IncompatibleDataSchema").msgclass - Action::IncompatibleDataSchema::SchemaChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange").enummodule - Action::InvalidDataPartition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataPartition").msgclass - Action::InvalidDataPartition::PartitionStructure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure").enummodule - Action::MissingData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.MissingData").msgclass - Action::InvalidDataOrganization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataOrganization").msgclass - Action::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.Category").enummodule - Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset").msgclass - Asset::SecurityStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.SecurityStatus").msgclass - Asset::SecurityStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.SecurityStatus.State").enummodule - Asset::DiscoverySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec").msgclass - Asset::DiscoverySpec::CsvOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions").msgclass - Asset::DiscoverySpec::JsonOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions").msgclass - Asset::ResourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec").msgclass - Asset::ResourceSpec::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec.Type").enummodule - Asset::ResourceSpec::AccessMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode").enummodule - Asset::ResourceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceStatus").msgclass - Asset::ResourceStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceStatus.State").enummodule - Asset::DiscoveryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus").msgclass - Asset::DiscoveryStatus::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats").msgclass - Asset::DiscoveryStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus.State").enummodule - State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb deleted file mode 100644 index ef6ed7dc41ff..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/dataplex/v1/dataplex_service/rest" -require "google/cloud/dataplex/v1/catalog_service/rest" -require "google/cloud/dataplex/v1/content_service/rest" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest" -require "google/cloud/dataplex/v1/data_scan_service/rest" -require "google/cloud/dataplex/v1/metadata_service/rest" -require "google/cloud/dataplex/v1/bindings_override" -require "google/cloud/dataplex/v1/version" - -module Google - module Cloud - module Dataplex - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/dataplex/v1/rest" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb deleted file mode 100644 index 0afab5d5d3ac..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/security.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\'google/cloud/dataplex/v1/security.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\"U\n\x12ResourceAccessSpec\x12\x14\n\x07readers\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x14\n\x07writers\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06owners\x18\x03 \x03(\tB\x03\xe0\x41\x01\"&\n\x0e\x44\x61taAccessSpec\x12\x14\n\x07readers\x18\x01 \x03(\tB\x03\xe0\x41\x01\x42i\n\x1c\x63om.google.cloud.dataplex.v1B\rSecurityProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - ResourceAccessSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ResourceAccessSpec").msgclass - DataAccessSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAccessSpec").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb deleted file mode 100644 index f7926ab78db0..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb +++ /dev/null @@ -1,101 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/analyze_pb' -require 'google/cloud/dataplex/v1/resources_pb' -require 'google/cloud/dataplex/v1/tasks_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/dataplex/v1/service.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/dataplex/v1/analyze.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a$google/cloud/dataplex/v1/tasks.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x01\n\x11\x43reateLakeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x14\n\x07lake_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x04lake\x18\x03 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.LakeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x11UpdateLakeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x31\n\x04lake\x18\x02 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.LakeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x11\x44\x65leteLakeRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\"\xaa\x01\n\x10ListLakesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x11ListLakesResponse\x12-\n\x05lakes\x18\x01 \x03(\x0b\x32\x1e.google.cloud.dataplex.v1.Lake\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"\x7f\n\x16ListLakeActionsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"a\n\x13ListActionsResponse\x12\x31\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32 .google.cloud.dataplex.v1.Action\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"D\n\x0eGetLakeRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\"\xae\x01\n\x11\x43reateZoneRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x14\n\x07zone_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x04zone\x18\x03 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.ZoneB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x11UpdateZoneRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x31\n\x04zone\x18\x02 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.ZoneB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x11\x44\x65leteZoneRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\"\xa5\x01\n\x10ListZonesRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"[\n\x11ListZonesResponse\x12-\n\x05zones\x18\x01 \x03(\x0b\x32\x1e.google.cloud.dataplex.v1.Zone\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x7f\n\x16ListZoneActionsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"D\n\x0eGetZoneRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\"\xb2\x01\n\x12\x43reateAssetRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x15\n\x08\x61sset_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x05\x61sset\x18\x03 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.AssetB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x9b\x01\n\x12UpdateAssetRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x33\n\x05\x61sset\x18\x02 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.AssetB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"I\n\x12\x44\x65leteAssetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\"\xa6\x01\n\x11ListAssetsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"^\n\x12ListAssetsResponse\x12/\n\x06\x61ssets\x18\x01 \x03(\x0b\x32\x1f.google.cloud.dataplex.v1.Asset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x81\x01\n\x17ListAssetActionsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"F\n\x0fGetAssetRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xae\x01\n\x11\x43reateTaskRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x14\n\x07task_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x04task\x18\x03 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.TaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x11UpdateTaskRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x31\n\x04task\x18\x02 \x01(\x0b\x32\x1e.google.cloud.dataplex.v1.TaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"G\n\x11\x44\x65leteTaskRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\"\xa5\x01\n\x10ListTasksRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x11ListTasksResponse\x12-\n\x05tasks\x18\x01 \x03(\x0b\x32\x1e.google.cloud.dataplex.v1.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"D\n\x0eGetTaskRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\"B\n\rGetJobRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x64\x61taplex.googleapis.com/Job\"\xb2\x02\n\x0eRunTaskRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.RunTaskRequest.LabelsEntryB\x03\xe0\x41\x01\x12\x45\n\x04\x61rgs\x18\x04 \x03(\x0b\x32\x32.google.cloud.dataplex.v1.RunTaskRequest.ArgsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"=\n\x0fRunTaskResponse\x12*\n\x03job\x18\x01 \x01(\x0b\x32\x1d.google.cloud.dataplex.v1.Job\"x\n\x0fListJobsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"X\n\x10ListJobsResponse\x12+\n\x04jobs\x18\x01 \x03(\x0b\x32\x1d.google.cloud.dataplex.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"E\n\x10\x43\x61ncelJobRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x64\x61taplex.googleapis.com/Job\"\xca\x01\n\x18\x43reateEnvironmentRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x1b\n\x0e\x65nvironment_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0b\x65nvironment\x18\x03 \x01(\x0b\x32%.google.cloud.dataplex.v1.EnvironmentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xad\x01\n\x18UpdateEnvironmentRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12?\n\x0b\x65nvironment\x18\x02 \x01(\x0b\x32%.google.cloud.dataplex.v1.EnvironmentB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"U\n\x18\x44\x65leteEnvironmentRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/Environment\"\xac\x01\n\x17ListEnvironmentsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"p\n\x18ListEnvironmentsResponse\x12;\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32%.google.cloud.dataplex.v1.Environment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x15GetEnvironmentRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/Environment\"\x98\x01\n\x13ListSessionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/Environment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"d\n\x14ListSessionsResponse\x12\x33\n\x08sessions\x18\x01 \x03(\x0b\x32!.google.cloud.dataplex.v1.Session\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xac\x32\n\x0f\x44\x61taplexService\x12\xc3\x01\n\nCreateLake\x12+.google.cloud.dataplex.v1.CreateLakeRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41\x19\n\x04Lake\x12\x11OperationMetadata\xda\x41\x13parent,lake,lake_id\x82\xd3\xe4\x93\x02\x31\")/v1/{parent=projects/*/locations/*}/lakes:\x04lake\x12\xc5\x01\n\nUpdateLake\x12+.google.cloud.dataplex.v1.UpdateLakeRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41\x19\n\x04Lake\x12\x11OperationMetadata\xda\x41\x10lake,update_mask\x82\xd3\xe4\x93\x02\x36\x32./v1/{lake.name=projects/*/locations/*/lakes/*}:\x04lake\x12\xbf\x01\n\nDeleteLake\x12+.google.cloud.dataplex.v1.DeleteLakeRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02+*)/v1/{name=projects/*/locations/*/lakes/*}\x12\xa0\x01\n\tListLakes\x12*.google.cloud.dataplex.v1.ListLakesRequest\x1a+.google.cloud.dataplex.v1.ListLakesResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/v1/{parent=projects/*/locations/*}/lakes\x12\x8d\x01\n\x07GetLake\x12(.google.cloud.dataplex.v1.GetLakeRequest\x1a\x1e.google.cloud.dataplex.v1.Lake\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/v1/{name=projects/*/locations/*/lakes/*}\x12\xb8\x01\n\x0fListLakeActions\x12\x30.google.cloud.dataplex.v1.ListLakeActionsRequest\x1a-.google.cloud.dataplex.v1.ListActionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*/lakes/*}/actions\x12\xcb\x01\n\nCreateZone\x12+.google.cloud.dataplex.v1.CreateZoneRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41\x19\n\x04Zone\x12\x11OperationMetadata\xda\x41\x13parent,zone,zone_id\x82\xd3\xe4\x93\x02\x39\"1/v1/{parent=projects/*/locations/*/lakes/*}/zones:\x04zone\x12\xcd\x01\n\nUpdateZone\x12+.google.cloud.dataplex.v1.UpdateZoneRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x19\n\x04Zone\x12\x11OperationMetadata\xda\x41\x10zone,update_mask\x82\xd3\xe4\x93\x02>26/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}:\x04zone\x12\xc7\x01\n\nDeleteZone\x12+.google.cloud.dataplex.v1.DeleteZoneRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/lakes/*/zones/*}\x12\xa8\x01\n\tListZones\x12*.google.cloud.dataplex.v1.ListZonesRequest\x1a+.google.cloud.dataplex.v1.ListZonesResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*/lakes/*}/zones\x12\x95\x01\n\x07GetZone\x12(.google.cloud.dataplex.v1.GetZoneRequest\x1a\x1e.google.cloud.dataplex.v1.Zone\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/lakes/*/zones/*}\x12\xc0\x01\n\x0fListZoneActions\x12\x30.google.cloud.dataplex.v1.ListZoneActionsRequest\x1a-.google.cloud.dataplex.v1.ListActionsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions\x12\xda\x01\n\x0b\x43reateAsset\x12,.google.cloud.dataplex.v1.CreateAssetRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x1a\n\x05\x41sset\x12\x11OperationMetadata\xda\x41\x15parent,asset,asset_id\x82\xd3\xe4\x93\x02\x43\":/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets:\x05\x61sset\x12\xdd\x01\n\x0bUpdateAsset\x12,.google.cloud.dataplex.v1.UpdateAssetRequest\x1a\x1d.google.longrunning.Operation\"\x80\x01\xca\x41\x1a\n\x05\x41sset\x12\x11OperationMetadata\xda\x41\x11\x61sset,update_mask\x82\xd3\xe4\x93\x02I2@/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}:\x05\x61sset\x12\xd2\x01\n\x0b\x44\x65leteAsset\x12,.google.cloud.dataplex.v1.DeleteAssetRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}\x12\xb4\x01\n\nListAssets\x12+.google.cloud.dataplex.v1.ListAssetsRequest\x1a,.google.cloud.dataplex.v1.ListAssetsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets\x12\xa1\x01\n\x08GetAsset\x12).google.cloud.dataplex.v1.GetAssetRequest\x1a\x1f.google.cloud.dataplex.v1.Asset\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}\x12\xcb\x01\n\x10ListAssetActions\x12\x31.google.cloud.dataplex.v1.ListAssetActionsRequest\x1a-.google.cloud.dataplex.v1.ListActionsResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions\x12\xcb\x01\n\nCreateTask\x12+.google.cloud.dataplex.v1.CreateTaskRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41\x19\n\x04Task\x12\x11OperationMetadata\xda\x41\x13parent,task,task_id\x82\xd3\xe4\x93\x02\x39\"1/v1/{parent=projects/*/locations/*/lakes/*}/tasks:\x04task\x12\xcd\x01\n\nUpdateTask\x12+.google.cloud.dataplex.v1.UpdateTaskRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x19\n\x04Task\x12\x11OperationMetadata\xda\x41\x10task,update_mask\x82\xd3\xe4\x93\x02>26/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}:\x04task\x12\xc7\x01\n\nDeleteTask\x12+.google.cloud.dataplex.v1.DeleteTaskRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/lakes/*/tasks/*}\x12\xa8\x01\n\tListTasks\x12*.google.cloud.dataplex.v1.ListTasksRequest\x1a+.google.cloud.dataplex.v1.ListTasksResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*/lakes/*}/tasks\x12\x95\x01\n\x07GetTask\x12(.google.cloud.dataplex.v1.GetTaskRequest\x1a\x1e.google.cloud.dataplex.v1.Task\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/lakes/*/tasks/*}\x12\xac\x01\n\x08ListJobs\x12).google.cloud.dataplex.v1.ListJobsRequest\x1a*.google.cloud.dataplex.v1.ListJobsResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs\x12\xa7\x01\n\x07RunTask\x12(.google.cloud.dataplex.v1.RunTaskRequest\x1a).google.cloud.dataplex.v1.RunTaskResponse\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run:\x01*\x12\x99\x01\n\x06GetJob\x12\'.google.cloud.dataplex.v1.GetJobRequest\x1a\x1d.google.cloud.dataplex.v1.Job\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}\x12\xa2\x01\n\tCancelJob\x12*.google.cloud.dataplex.v1.CancelJobRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\"?/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel:\x01*\x12\xfd\x01\n\x11\x43reateEnvironment\x12\x32.google.cloud.dataplex.v1.CreateEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41 \n\x0b\x45nvironment\x12\x11OperationMetadata\xda\x41!parent,environment,environment_id\x82\xd3\xe4\x93\x02G\"8/v1/{parent=projects/*/locations/*/lakes/*}/environments:\x0b\x65nvironment\x12\xff\x01\n\x11UpdateEnvironment\x12\x32.google.cloud.dataplex.v1.UpdateEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41 \n\x0b\x45nvironment\x12\x11OperationMetadata\xda\x41\x17\x65nvironment,update_mask\x82\xd3\xe4\x93\x02S2D/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}:\x0b\x65nvironment\x12\xdc\x01\n\x11\x44\x65leteEnvironment\x12\x32.google.cloud.dataplex.v1.DeleteEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/lakes/*/environments/*}\x12\xc4\x01\n\x10ListEnvironments\x12\x31.google.cloud.dataplex.v1.ListEnvironmentsRequest\x1a\x32.google.cloud.dataplex.v1.ListEnvironmentsResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/lakes/*}/environments\x12\xb1\x01\n\x0eGetEnvironment\x12/.google.cloud.dataplex.v1.GetEnvironmentRequest\x1a%.google.cloud.dataplex.v1.Environment\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/lakes/*/environments/*}\x12\xc3\x01\n\x0cListSessions\x12-.google.cloud.dataplex.v1.ListSessionsRequest\x1a..google.cloud.dataplex.v1.ListSessionsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBh\n\x1c\x63om.google.cloud.dataplex.v1B\x0cServiceProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.dataplex.v1.Lake", "google/cloud/dataplex/v1/resources.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.dataplex.v1.Task", "google/cloud/dataplex/v1/tasks.proto"], - ["google.cloud.dataplex.v1.Environment", "google/cloud/dataplex/v1/analyze.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - CreateLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateLakeRequest").msgclass - UpdateLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateLakeRequest").msgclass - DeleteLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteLakeRequest").msgclass - ListLakesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakesRequest").msgclass - ListLakesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakesResponse").msgclass - ListLakeActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakeActionsRequest").msgclass - ListActionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListActionsResponse").msgclass - GetLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetLakeRequest").msgclass - CreateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateZoneRequest").msgclass - UpdateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateZoneRequest").msgclass - DeleteZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteZoneRequest").msgclass - ListZonesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZonesRequest").msgclass - ListZonesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZonesResponse").msgclass - ListZoneActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZoneActionsRequest").msgclass - GetZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetZoneRequest").msgclass - CreateAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateAssetRequest").msgclass - UpdateAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateAssetRequest").msgclass - DeleteAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteAssetRequest").msgclass - ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetsRequest").msgclass - ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetsResponse").msgclass - ListAssetActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetActionsRequest").msgclass - GetAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetAssetRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.OperationMetadata").msgclass - CreateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateTaskRequest").msgclass - UpdateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateTaskRequest").msgclass - DeleteTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteTaskRequest").msgclass - ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListTasksRequest").msgclass - ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListTasksResponse").msgclass - GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetTaskRequest").msgclass - GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetJobRequest").msgclass - RunTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunTaskRequest").msgclass - RunTaskResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunTaskResponse").msgclass - ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListJobsRequest").msgclass - ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListJobsResponse").msgclass - CancelJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CancelJobRequest").msgclass - CreateEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEnvironmentRequest").msgclass - UpdateEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEnvironmentRequest").msgclass - DeleteEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEnvironmentRequest").msgclass - ListEnvironmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEnvironmentsRequest").msgclass - ListEnvironmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEnvironmentsResponse").msgclass - GetEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEnvironmentRequest").msgclass - ListSessionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListSessionsRequest").msgclass - ListSessionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListSessionsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb deleted file mode 100644 index 8e58c9ae95b2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb +++ /dev/null @@ -1,117 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/service.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# - -require 'grpc' -require 'google/cloud/dataplex/v1/service_pb' - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - # 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 Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.DataplexService' - - # Creates a lake resource. - rpc :CreateLake, ::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Google::Longrunning::Operation - # Updates a lake resource. - rpc :UpdateLake, ::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Google::Longrunning::Operation - # Deletes a lake resource. All zones within the lake must be deleted before - # the lake can be deleted. - rpc :DeleteLake, ::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Google::Longrunning::Operation - # Lists lake resources in a project and location. - rpc :ListLakes, ::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Google::Cloud::Dataplex::V1::ListLakesResponse - # Retrieves a lake resource. - rpc :GetLake, ::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Google::Cloud::Dataplex::V1::Lake - # Lists action resources in a lake. - rpc :ListLakeActions, ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse - # Creates a zone resource within a lake. - rpc :CreateZone, ::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Google::Longrunning::Operation - # Updates a zone resource. - rpc :UpdateZone, ::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Google::Longrunning::Operation - # Deletes a zone resource. All assets within a zone must be deleted before - # the zone can be deleted. - rpc :DeleteZone, ::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Google::Longrunning::Operation - # Lists zone resources in a lake. - rpc :ListZones, ::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Google::Cloud::Dataplex::V1::ListZonesResponse - # Retrieves a zone resource. - rpc :GetZone, ::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Google::Cloud::Dataplex::V1::Zone - # Lists action resources in a zone. - rpc :ListZoneActions, ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse - # Creates an asset resource. - rpc :CreateAsset, ::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Google::Longrunning::Operation - # Updates an asset resource. - rpc :UpdateAsset, ::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Google::Longrunning::Operation - # Deletes an asset resource. The referenced storage resource is detached - # (default) or deleted based on the associated Lifecycle policy. - rpc :DeleteAsset, ::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Google::Longrunning::Operation - # Lists asset resources in a zone. - rpc :ListAssets, ::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Google::Cloud::Dataplex::V1::ListAssetsResponse - # Retrieves an asset resource. - rpc :GetAsset, ::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Google::Cloud::Dataplex::V1::Asset - # Lists action resources in an asset. - rpc :ListAssetActions, ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse - # Creates a task resource within a lake. - rpc :CreateTask, ::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Google::Longrunning::Operation - # Update the task resource. - rpc :UpdateTask, ::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Google::Longrunning::Operation - # Delete the task resource. - rpc :DeleteTask, ::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Google::Longrunning::Operation - # Lists tasks under the given lake. - rpc :ListTasks, ::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Google::Cloud::Dataplex::V1::ListTasksResponse - # Get task resource. - rpc :GetTask, ::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Google::Cloud::Dataplex::V1::Task - # Lists Jobs under the given task. - rpc :ListJobs, ::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Google::Cloud::Dataplex::V1::ListJobsResponse - # Run an on demand execution of a Task. - rpc :RunTask, ::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Google::Cloud::Dataplex::V1::RunTaskResponse - # Get job resource. - rpc :GetJob, ::Google::Cloud::Dataplex::V1::GetJobRequest, ::Google::Cloud::Dataplex::V1::Job - # Cancel jobs running for the task resource. - rpc :CancelJob, ::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Google::Protobuf::Empty - # Create an environment resource. - rpc :CreateEnvironment, ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, ::Google::Longrunning::Operation - # Update the environment resource. - rpc :UpdateEnvironment, ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, ::Google::Longrunning::Operation - # Delete the environment resource. All the child resources must have been - # deleted before environment deletion can be initiated. - rpc :DeleteEnvironment, ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, ::Google::Longrunning::Operation - # Lists environments under the given lake. - rpc :ListEnvironments, ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse - # Get environment resource. - rpc :GetEnvironment, ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, ::Google::Cloud::Dataplex::V1::Environment - # Lists session resources in an environment. - rpc :ListSessions, ::Google::Cloud::Dataplex::V1::ListSessionsRequest, ::Google::Cloud::Dataplex::V1::ListSessionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb deleted file mode 100644 index 81b3556fdcdd..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/tasks.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/resources_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n$google/cloud/dataplex/v1/tasks.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x16\n\x04Task\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x07 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x08 \x03(\x0b\x32*.google.cloud.dataplex.v1.Task.LabelsEntryB\x03\xe0\x41\x01\x12\x45\n\x0ctrigger_spec\x18\x64 \x01(\x0b\x32*.google.cloud.dataplex.v1.Task.TriggerSpecB\x03\xe0\x41\x02\x12I\n\x0e\x65xecution_spec\x18\x65 \x01(\x0b\x32,.google.cloud.dataplex.v1.Task.ExecutionSpecB\x03\xe0\x41\x02\x12N\n\x10\x65xecution_status\x18\xc9\x01 \x01(\x0b\x32..google.cloud.dataplex.v1.Task.ExecutionStatusB\x03\xe0\x41\x03\x12@\n\x05spark\x18\xac\x02 \x01(\x0b\x32..google.cloud.dataplex.v1.Task.SparkTaskConfigH\x00\x12\x46\n\x08notebook\x18\xae\x02 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.NotebookTaskConfigH\x00\x1a\x9a\x06\n\x12InfrastructureSpec\x12X\n\x05\x62\x61tch\x18\x34 \x01(\x0b\x32G.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResourcesH\x00\x12\x62\n\x0f\x63ontainer_image\x18\x65 \x01(\x0b\x32G.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntimeH\x01\x12T\n\x0bvpc_network\x18\x96\x01 \x01(\x0b\x32<.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetworkH\x02\x1aW\n\x15\x42\x61tchComputeResources\x12\x1c\n\x0f\x65xecutors_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12 \n\x13max_executors_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a\x86\x02\n\x15\x43ontainerImageRuntime\x12\x12\n\x05image\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tjava_jars\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fpython_packages\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12p\n\nproperties\x18\x04 \x03(\x0b\x32W.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.PropertiesEntryB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\nVpcNetwork\x12\x16\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1a\n\x0bsub_network\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\x0cnetwork_tags\x18\x03 \x03(\tB\x03\xe0\x41\x01\x42\x0e\n\x0cnetwork_nameB\x0b\n\tresourcesB\t\n\x07runtimeB\t\n\x07network\x1a\x9a\x02\n\x0bTriggerSpec\x12\x45\n\x04type\x18\x05 \x01(\x0e\x32/.google.cloud.dataplex.v1.Task.TriggerSpec.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x33\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_retries\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\x64 \x01(\tB\x03\xe0\x41\x01H\x00\":\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\r\n\tRECURRING\x10\x02\x42\t\n\x07trigger\x1a\x95\x02\n\rExecutionSpec\x12I\n\x04\x61rgs\x18\x04 \x03(\x0b\x32\x36.google.cloud.dataplex.v1.Task.ExecutionSpec.ArgsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07project\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x1amax_job_execution_lifetime\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x14\n\x07kms_key\x18\t \x01(\tB\x03\xe0\x41\x01\x1a+\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xa5\x02\n\x0fSparkTaskConfig\x12\x1b\n\x11main_jar_file_uri\x18\x64 \x01(\tH\x00\x12\x14\n\nmain_class\x18\x65 \x01(\tH\x00\x12\x1c\n\x12python_script_file\x18\x66 \x01(\tH\x00\x12\x19\n\x0fsql_script_file\x18h \x01(\tH\x00\x12\x14\n\nsql_script\x18i \x01(\tH\x00\x12\x16\n\tfile_uris\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61rchive_uris\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12S\n\x13infrastructure_spec\x18\x06 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.InfrastructureSpecB\x03\xe0\x41\x01\x42\x08\n\x06\x64river\x1a\xb3\x01\n\x12NotebookTaskConfig\x12\x15\n\x08notebook\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12S\n\x13infrastructure_spec\x18\x03 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.InfrastructureSpecB\x03\xe0\x41\x01\x12\x16\n\tfile_uris\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61rchive_uris\x18\x06 \x03(\tB\x03\xe0\x41\x01\x1a\x7f\n\x0f\x45xecutionStatus\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\nlatest_job\x18\t \x01(\x0b\x32\x1d.google.cloud.dataplex.v1.JobB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:d\xea\x41\x61\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x41projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}B\x08\n\x06\x63onfig\"\xc5\x07\n\x03Job\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x03\xfa\x41\x1d\n\x1b\x64\x61taplex.googleapis.com/Job\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x05state\x18\x05 \x01(\x0e\x32#.google.cloud.dataplex.v1.Job.StateB\x03\xe0\x41\x03\x12\x18\n\x0bretry_count\x18\x06 \x01(\rB\x03\xe0\x41\x03\x12;\n\x07service\x18\x07 \x01(\x0e\x32%.google.cloud.dataplex.v1.Job.ServiceB\x03\xe0\x41\x03\x12\x18\n\x0bservice_job\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\t \x01(\tB\x03\xe0\x41\x03\x12>\n\x06labels\x18\n \x03(\x0b\x32).google.cloud.dataplex.v1.Job.LabelsEntryB\x03\xe0\x41\x03\x12;\n\x07trigger\x18\x0b \x01(\x0e\x32%.google.cloud.dataplex.v1.Job.TriggerB\x03\xe0\x41\x03\x12I\n\x0e\x65xecution_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.Task.ExecutionSpecB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"0\n\x07Service\x12\x17\n\x13SERVICE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TAPROC\x10\x01\"r\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0e\n\nCANCELLING\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0b\n\x07\x41\x42ORTED\x10\x06\"D\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTASK_CONFIG\x10\x01\x12\x0f\n\x0bRUN_REQUEST\x10\x02:n\xea\x41k\n\x1b\x64\x61taplex.googleapis.com/Job\x12Lprojects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}Bf\n\x1c\x63om.google.cloud.dataplex.v1B\nTasksProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Dataplex - module V1 - Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task").msgclass - Task::InfrastructureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec").msgclass - Task::InfrastructureSpec::BatchComputeResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources").msgclass - Task::InfrastructureSpec::ContainerImageRuntime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime").msgclass - Task::InfrastructureSpec::VpcNetwork = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork").msgclass - Task::TriggerSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.TriggerSpec").msgclass - Task::TriggerSpec::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.TriggerSpec.Type").enummodule - Task::ExecutionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.ExecutionSpec").msgclass - Task::SparkTaskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.SparkTaskConfig").msgclass - Task::NotebookTaskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.NotebookTaskConfig").msgclass - Task::ExecutionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.ExecutionStatus").msgclass - Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job").msgclass - Job::Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.Service").enummodule - Job::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.State").enummodule - Job::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.Trigger").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb deleted file mode 100644 index 5ab8544710fa..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md deleted file mode 100644 index b4aad34dcd67..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Dataplex V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 934c39849a6a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,399 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: - # seconds: 60 # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: - # seconds: 360 # 6 minutes - # total_poll_timeout: - # seconds: 54000 # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index b03587481349..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 38b4b61e6061..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 6497ebc78dc1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same - # concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb deleted file mode 100644 index eda6a23185b7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb +++ /dev/null @@ -1,290 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # Environment represents a user-visible compute infrastructure for analytics - # within a lake. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the environment, of the form: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/environment/\\{environment_id} - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Environment creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the environment was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined labels for the environment. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the environment. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the environment. - # @!attribute [rw] infrastructure_spec - # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec] - # Required. Infrastructure specification for the Environment. - # @!attribute [rw] session_spec - # @return [::Google::Cloud::Dataplex::V1::Environment::SessionSpec] - # Optional. Configuration for sessions created for this environment. - # @!attribute [r] session_status - # @return [::Google::Cloud::Dataplex::V1::Environment::SessionStatus] - # Output only. Status of sessions created for this environment. - # @!attribute [r] endpoints - # @return [::Google::Cloud::Dataplex::V1::Environment::Endpoints] - # Output only. URI Endpoints to access sessions associated with the - # Environment. - class Environment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for the underlying infrastructure used to run workloads. - # @!attribute [rw] compute - # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec::ComputeResources] - # Optional. Compute resources needed for analyze interactive workloads. - # @!attribute [rw] os_image - # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec::OsImageRuntime] - # Required. Software Runtime Configuration for analyze interactive - # workloads. - class InfrastructureSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Compute resources associated with the analyze interactive workloads. - # @!attribute [rw] disk_size_gb - # @return [::Integer] - # Optional. Size in GB of the disk. Default is 100 GB. - # @!attribute [rw] node_count - # @return [::Integer] - # Optional. Total number of nodes in the sessions created for this - # environment. - # @!attribute [rw] max_node_count - # @return [::Integer] - # Optional. Max configurable nodes. - # If max_node_count > node_count, then auto-scaling is enabled. - class ComputeResources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Software Runtime Configuration to run Analyze. - # @!attribute [rw] image_version - # @return [::String] - # Required. Dataplex Image version. - # @!attribute [rw] java_libraries - # @return [::Array<::String>] - # 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 - # @!attribute [rw] python_packages - # @return [::Array<::String>] - # 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 - # @!attribute [rw] properties - # @return [::Google::Protobuf::Map{::String => ::String}] - # 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". - class OsImageRuntime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class PropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Configuration for sessions created for this environment. - # @!attribute [rw] max_idle_duration - # @return [::Google::Protobuf::Duration] - # Optional. The idle time configuration of the session. The session will be - # auto-terminated at the end of this period. - # @!attribute [rw] enable_fast_startup - # @return [::Boolean] - # 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. - class SessionSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of sessions created for this environment. - # @!attribute [r] active - # @return [::Boolean] - # Output only. Queries over sessions to mark whether the environment is - # currently active or not - class SessionStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # URI Endpoints to access sessions associated with the Environment. - # @!attribute [r] notebooks - # @return [::String] - # Output only. URI to serve notebook APIs - # @!attribute [r] sql - # @return [::String] - # Output only. URI to serve SQL APIs - class Endpoints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Content represents a user-visible notebook or a sql script - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the content, of the form: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [rw] path - # @return [::String] - # Required. The path for the Content file, represented as directory - # structure. Unique within a lake. Limited to alphanumerics, hyphens, - # underscores, dots and slashes. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Content creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the content was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined labels for the content. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the content. - # @!attribute [rw] data_text - # @return [::String] - # Required. Content data in string format. - # @!attribute [rw] sql_script - # @return [::Google::Cloud::Dataplex::V1::Content::SqlScript] - # Sql Script related configurations. - # @!attribute [rw] notebook - # @return [::Google::Cloud::Dataplex::V1::Content::Notebook] - # Notebook related configurations. - class Content - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for the Sql Script content. - # @!attribute [rw] engine - # @return [::Google::Cloud::Dataplex::V1::Content::SqlScript::QueryEngine] - # Required. Query Engine to be used for the Sql Query. - class SqlScript - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Query Engine Type of the SQL Script. - module QueryEngine - # Value was unspecified. - QUERY_ENGINE_UNSPECIFIED = 0 - - # Spark SQL Query. - SPARK = 2 - end - end - - # Configuration for Notebook content. - # @!attribute [rw] kernel_type - # @return [::Google::Cloud::Dataplex::V1::Content::Notebook::KernelType] - # Required. Kernel Type of the notebook. - class Notebook - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Kernel Type of the Jupyter notebook. - module KernelType - # Kernel Type unspecified. - KERNEL_TYPE_UNSPECIFIED = 0 - - # Python 3 Kernel. - PYTHON3 = 1 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Represents an active analyze session running for a user. - # @!attribute [r] name - # @return [::String] - # 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} - # @!attribute [r] user_id - # @return [::String] - # Output only. Email of user running the session. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Session start time. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. State of Session - class Session - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb deleted file mode 100644 index aca578b5e853..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb +++ /dev/null @@ -1,1092 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # Aspect Type is a template for creating Aspects, and represents the - # JSON-schema for a given Entry, e.g., BigQuery Table Schema. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the AspectType, of the form: - # projects/\\{project_number}/locations/\\{location_id}/aspectTypes/\\{aspect_type_id}. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the AspectType was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the AspectType was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the AspectType. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the AspectType. - # @!attribute [rw] etag - # @return [::String] - # 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. - # @!attribute [rw] authorization - # @return [::Google::Cloud::Dataplex::V1::AspectType::Authorization] - # Immutable. Authorization defined for this type. - # @!attribute [rw] metadata_template - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] - # Required. MetadataTemplate of the aspect. - # @!attribute [r] transfer_status - # @return [::Google::Cloud::Dataplex::V1::TransferStatus] - # Output only. Denotes the transfer status of the Aspect Type. It is - # unspecified for Aspect Types created from Dataplex API. - class AspectType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Autorization for an Aspect Type. - # @!attribute [rw] alternate_use_permission - # @return [::String] - # 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. - class Authorization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # MetadataTemplate definition for AspectType - # @!attribute [rw] index - # @return [::Integer] - # 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. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the field. - # @!attribute [rw] type - # @return [::String] - # 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). - # @!attribute [rw] record_fields - # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate>] - # Optional. Field definition, needs to be specified if the type is record. - # Defines the nested fields. - # @!attribute [rw] enum_values - # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::EnumValue>] - # Optional. The list of values for an enum type. Needs to be defined if the - # type is enum. - # @!attribute [rw] map_items - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] - # 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 - # MetadataTemplate. The recommended value for the name field is item, as - # this is not used in the actual payload. - # @!attribute [rw] array_items - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] - # 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. - # @!attribute [rw] type_id - # @return [::String] - # 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. - # @!attribute [rw] type_ref - # @return [::String] - # Optional. A reference to another field definition (instead of 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 - # refer to other fields. - # @!attribute [rw] constraints - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::Constraints] - # Optional. Specifies the constraints on this field. - # @!attribute [rw] annotations - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::Annotations] - # Optional. Specifies annotations on this field. - class MetadataTemplate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Definition of Enumvalue (to be used by enum fields) - # @!attribute [rw] index - # @return [::Integer] - # Required. Index for the enum. Cannot be modified. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the enumvalue. This is the actual value that the - # aspect will contain. - # @!attribute [rw] deprecated - # @return [::String] - # Optional. Optional deprecation message to be set if an enum value needs - # to be deprecated. - class EnumValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Definition of the constraints of a field - # @!attribute [rw] required - # @return [::Boolean] - # Optional. Marks this as an optional/required field. - class Constraints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Definition of the annotations of a field - # @!attribute [rw] deprecated - # @return [::String] - # Optional. Marks a field as deprecated, a deprecation message can be - # included. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Specify a displayname for a field. - # @!attribute [rw] description - # @return [::String] - # Optional. Specify a description for a field - # @!attribute [rw] display_order - # @return [::Integer] - # Optional. Specify a display order for a field. Display order can be - # used to reorder where a field is rendered - # @!attribute [rw] string_type - # @return [::String] - # 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. - # @!attribute [rw] string_values - # @return [::Array<::String>] - # Optional. Suggested hints for string fields. These can be used to - # suggest values to users, through an UI for example. - class Annotations - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An Entry Group represents a logical grouping of one or more Entries. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the EntryGroup, of the form: - # projects/\\{project_number}/locations/\\{location_id}/entryGroups/\\{entry_group_id}. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the EntryGroup was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the EntryGroup was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the EntryGroup. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the EntryGroup. - # @!attribute [rw] etag - # @return [::String] - # 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. - # @!attribute [r] transfer_status - # @return [::Google::Cloud::Dataplex::V1::TransferStatus] - # Output only. Denotes the transfer status of the Entry Group. It is - # unspecified for Entry Group created from Dataplex API. - class EntryGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Entry Type is a template for creating Entries. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the EntryType, of the form: - # projects/\\{project_number}/locations/\\{location_id}/entryTypes/\\{entry_type_id}. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the EntryType was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the EntryType was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the EntryType. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the EntryType. - # @!attribute [rw] etag - # @return [::String] - # 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. - # @!attribute [rw] type_aliases - # @return [::Array<::String>] - # Optional. Indicates the class this Entry Type belongs to, for example, - # TABLE, DATABASE, MODEL. - # @!attribute [rw] platform - # @return [::String] - # Optional. The platform that Entries of this type belongs to. - # @!attribute [rw] system - # @return [::String] - # Optional. The system that Entries of this type belongs to. Examples include - # CloudSQL, MariaDB etc - # @!attribute [rw] required_aspects - # @return [::Array<::Google::Cloud::Dataplex::V1::EntryType::AspectInfo>] - # AspectInfo for the entry type. - # @!attribute [rw] authorization - # @return [::Google::Cloud::Dataplex::V1::EntryType::Authorization] - # Immutable. Authorization defined for this type. - class EntryType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] type - # @return [::String] - # Required aspect type for the entry type. - class AspectInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Authorization for an Entry Type. - # @!attribute [rw] alternate_use_permission - # @return [::String] - # 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. - class Authorization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An aspect is a single piece of metadata describing an entry. - # @!attribute [r] aspect_type - # @return [::String] - # Output only. The resource name of the type used to create this Aspect. - # @!attribute [r] path - # @return [::String] - # Output only. The path in the entry under which the aspect is attached. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Aspect was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Aspect was last updated. - # @!attribute [rw] data - # @return [::Google::Protobuf::Struct] - # 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). - # @!attribute [rw] aspect_source - # @return [::Google::Cloud::Dataplex::V1::AspectSource] - class Aspect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AspectSource contains source system related information for the - # aspect. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The create time of the aspect in the source system. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The update time of the aspect in the source system. - class AspectSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An entry is a representation of a data asset which can be described by - # various metadata. - # @!attribute [rw] name - # @return [::String] - # Identifier. The relative resource name of the Entry, of the form: - # projects/\\{project}/locations/\\{location}/entryGroups/\\{entry_group}/entries/\\{entry}. - # @!attribute [rw] entry_type - # @return [::String] - # Required. Immutable. The resource name of the EntryType used to create this - # Entry. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Entry was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Entry was last updated. - # @!attribute [rw] aspects - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Dataplex::V1::Aspect}] - # 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) - # @!attribute [rw] parent_entry - # @return [::String] - # Optional. Immutable. The resource name of the parent entry. - # @!attribute [rw] fully_qualified_name - # @return [::String] - # Optional. A name for the entry that can reference it in an external system. - # The maximum size of the field is 4000 characters. - # @!attribute [rw] entry_source - # @return [::Google::Cloud::Dataplex::V1::EntrySource] - # Optional. Source system related information for an entry. - class Entry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Dataplex::V1::Aspect] - class AspectsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # EntrySource contains source system related information for the - # entry. - # @!attribute [rw] resource - # @return [::String] - # The name of the resource in the source system. - # The maximum size of the field is 4000 characters. - # @!attribute [rw] system - # @return [::String] - # The name of the source system. - # The maximum size of the field is 64 characters. - # @!attribute [rw] platform - # @return [::String] - # The platform containing the source system. - # The maximum size of the field is 64 characters. - # @!attribute [rw] display_name - # @return [::String] - # User friendly display name. - # The maximum size of the field is 500 characters. - # @!attribute [rw] description - # @return [::String] - # Description of the Entry. - # The maximum size of the field is 2000 characters. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # User-defined labels. - # The maximum size of keys and values is 128 characters each. - # @!attribute [rw] ancestors - # @return [::Array<::Google::Cloud::Dataplex::V1::EntrySource::Ancestor>] - # Immutable. The ancestors of the Entry in the source system. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The create time of the resource in the source system. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The update time of the resource in the source system. - class EntrySource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Ancestor contains information about individual items in the hierarchy of - # an Entry. - # @!attribute [rw] name - # @return [::String] - # Optional. The name of the ancestor resource. - # @!attribute [rw] type - # @return [::String] - # Optional. The type of the ancestor resource. - class Ancestor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Create EntryGroup Request - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the entryGroup, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a GCP region. - # @!attribute [rw] entry_group_id - # @return [::String] - # Required. EntryGroup identifier. - # @!attribute [rw] entry_group - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # Required. EntryGroup Resource - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateEntryGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update EntryGroup Request - # @!attribute [rw] entry_group - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # Required. EntryGroup Resource - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateEntryGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delele EntryGroup Request - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryGroupRequest method returns an ABORTED error response - class DeleteEntryGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List entryGroups request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListEntryGroupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List ListEntryGroups response. - # @!attribute [rw] entry_groups - # @return [::Array<::Google::Cloud::Dataplex::V1::EntryGroup>] - # ListEntryGroups under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListEntryGroupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get EntryGroup request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - class GetEntryGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create EntryType Request - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the EntryType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a GCP region. - # @!attribute [rw] entry_type_id - # @return [::String] - # Required. EntryType identifier. - # @!attribute [rw] entry_type - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # Required. EntryType Resource - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateEntryTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update EntryType Request - # @!attribute [rw] entry_type - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # Required. EntryType Resource - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateEntryTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delele EntryType Request - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryTypeRequest method returns an ABORTED error response - class DeleteEntryTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List EntryTypes request - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - class ListEntryTypesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List EntryTypes response - # @!attribute [rw] entry_types - # @return [::Array<::Google::Cloud::Dataplex::V1::EntryType>] - # ListEntryTypes under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListEntryTypesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get EntryType request - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - class GetEntryTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create AspectType Request - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the AspectType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a GCP region. - # @!attribute [rw] aspect_type_id - # @return [::String] - # Required. AspectType identifier. - # @!attribute [rw] aspect_type - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # Required. AspectType Resource - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateAspectTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update AspectType Request - # @!attribute [rw] aspect_type - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # Required. AspectType Resource - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateAspectTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delele AspectType Request - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteAspectTypeRequest method returns an ABORTED error response - class DeleteAspectTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List AspectTypes request - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - class ListAspectTypesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List AspectTypes response - # @!attribute [rw] aspect_types - # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType>] - # ListAspectTypes under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListAspectTypesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get AspectType request - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - class GetAspectTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @!attribute [rw] entry_id - # @return [::String] - # 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 - # `//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 - # Cloud. - # - # The maximum size of the field is 4000 characters. - # @!attribute [rw] entry - # @return [::Google::Cloud::Dataplex::V1::Entry] - # Required. Entry resource. - class CreateEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] entry - # @return [::Google::Cloud::Dataplex::V1::Entry] - # Required. Entry resource. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # 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. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true and the entry does not exist, it will be created. - # @!attribute [rw] delete_missing_aspects - # @return [::Boolean] - # 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. - # @!attribute [rw] aspect_keys - # @return [::Array<::String>] - # 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 - # `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. - class UpdateEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - class DeleteEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @!attribute [rw] page_size - # @return [::Integer] - # @!attribute [rw] page_token - # @return [::String] - # Optional. The pagination token returned by a previous request. - # @!attribute [rw] filter - # @return [::String] - # 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" - class ListEntriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] entries - # @return [::Array<::Google::Cloud::Dataplex::V1::Entry>] - # The list of entries. - # @!attribute [rw] next_page_token - # @return [::String] - # Pagination token. - class ListEntriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View for controlling which parts of an entry are to be returned. - # @!attribute [rw] aspect_types - # @return [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # Only works if the CUSTOM view is selected. - # @!attribute [rw] paths - # @return [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. Only works if the CUSTOM view is selected. - class GetEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/{location}`. - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View for controlling which parts of an entry are to be returned. - # @!attribute [rw] aspect_types - # @return [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # Only works if the CUSTOM view is selected. - # @!attribute [rw] paths - # @return [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. Only works if the CUSTOM view is selected. - # @!attribute [rw] entry - # @return [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - class LookupEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/{location}`. - # @!attribute [rw] query - # @return [::String] - # Required. The query against which entries in scope should be matched. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Pagination. - # @!attribute [rw] page_token - # @return [::String] - # @!attribute [rw] order_by - # @return [::String] - # Optional. Ordering of the results. Supported options to be added later. - # @!attribute [rw] scope - # @return [::String] - # 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. - class SearchEntriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single result of a SearchEntries request. - # @!attribute [rw] linked_resource - # @return [::String] - # Linked resource name. - # @!attribute [rw] dataplex_entry - # @return [::Google::Cloud::Dataplex::V1::Entry] - # Entry format of the result. - # @!attribute [rw] snippets - # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResult::Snippets] - # Snippets. - class SearchEntriesResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Snippets for the entry, contains HTML-style highlighting for - # matched tokens, will be used in UI. - # @!attribute [rw] dataplex_entry - # @return [::Google::Cloud::Dataplex::V1::Entry] - # Entry - class Snippets - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] - # The results matching the search query. - # @!attribute [rw] total_size - # @return [::Integer] - # The estimated total number of matching entries. Not guaranteed to be - # accurate. - # @!attribute [rw] next_page_token - # @return [::String] - # Pagination token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable locations. Search results don't include data from those - # locations. - class SearchEntriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # View for controlling which parts of an entry are to be returned. - module 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 would exceed 100, the first 100 will be returned. - CUSTOM = 3 - - # Returns all aspects. If the number of aspects would exceed 100, the first - # 100 will be returned. - ALL = 4 - end - - # Denotes the transfer status of a resource. It is unspecified for resources - # created from Dataplex API. - module 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 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb deleted file mode 100644 index 9fdc543e77b4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # Create content request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} - # @!attribute [rw] content - # @return [::Google::Cloud::Dataplex::V1::Content] - # Required. Content resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateContentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update content request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] content - # @return [::Google::Cloud::Dataplex::V1::Content] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateContentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete content request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - class DeleteContentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List content request. Returns the BASIC Content view. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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. - class ListContentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List content response. - # @!attribute [rw] content - # @return [::Array<::Google::Cloud::Dataplex::V1::Content>] - # Content under the given parent lake. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListContentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get content request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView] - # Optional. Specify content view to make a partial request. - class GetContentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies whether the request should return the full or the partial - # representation. - module 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 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb deleted file mode 100644 index 51cdbb703b14..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb +++ /dev/null @@ -1,321 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # DataProfileScan related setting. - # @!attribute [rw] sampling_percent - # @return [::Float] - # 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. - # @!attribute [rw] row_filter - # @return [::String] - # 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 - # @!attribute [rw] post_scan_actions - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::PostScanActions] - # Optional. Actions to take upon job completion.. - # @!attribute [rw] include_fields - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::SelectedFields] - # 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`. - # @!attribute [rw] exclude_fields - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::SelectedFields] - # Optional. The fields to exclude from data profile. - # - # If specified, the fields will be excluded from data profile, regardless of - # `include_fields` value. - class DataProfileSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration of post scan actions of DataProfileScan job. - # @!attribute [rw] bigquery_export - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::PostScanActions::BigQueryExport] - # Optional. If set, results will be exported to the provided BigQuery - # table. - class PostScanActions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration of BigQuery export post scan action. - # @!attribute [rw] results_table - # @return [::String] - # Optional. The BigQuery table to export DataProfileScan results to. - # Format: - # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - class BigQueryExport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The specification for fields to include or exclude in data profile scan. - # @!attribute [rw] field_names - # @return [::Array<::String>] - # 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'. - class SelectedFields - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # DataProfileResult defines the output of DataProfileScan. Each field of the - # table will have field type specific profile result. - # @!attribute [rw] row_count - # @return [::Integer] - # The count of rows scanned. - # @!attribute [rw] profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile] - # The profile information per field. - # @!attribute [rw] scanned_data - # @return [::Google::Cloud::Dataplex::V1::ScannedData] - # The data scanned for this result. - # @!attribute [r] post_scan_actions_result - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult] - # Output only. The result of post scan actions. - class DataProfileResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Contains name, type, mode and field type specific profile information. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field>] - # List of fields with structural and profile information for each field. - class Profile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A field within a table. - # @!attribute [rw] name - # @return [::String] - # The name of the field. - # @!attribute [rw] type - # @return [::String] - # 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). - # @!attribute [rw] mode - # @return [::String] - # 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. - # @!attribute [rw] profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo] - # Profile information for the corresponding field. - class Field - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The profile information for each field type. - # @!attribute [rw] null_ratio - # @return [::Float] - # Ratio of rows with null value against total scanned rows. - # @!attribute [rw] distinct_ratio - # @return [::Float] - # Ratio of rows with distinct values against total scanned rows. - # Not available for complex non-groupable field type RECORD and fields - # with REPEATABLE mode. - # @!attribute [rw] top_n_values - # @return [::Array<::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::TopNValue>] - # 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. - # @!attribute [rw] string_profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::StringFieldInfo] - # String type field information. - # @!attribute [rw] integer_profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::IntegerFieldInfo] - # Integer type field information. - # @!attribute [rw] double_profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::DoubleFieldInfo] - # Double type field information. - class ProfileInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The profile information for a string type field. - # @!attribute [rw] min_length - # @return [::Integer] - # Minimum length of non-null values in the scanned data. - # @!attribute [rw] max_length - # @return [::Integer] - # Maximum length of non-null values in the scanned data. - # @!attribute [rw] average_length - # @return [::Float] - # Average length of non-null values in the scanned data. - class StringFieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The profile information for an integer type field. - # @!attribute [rw] average - # @return [::Float] - # Average of non-null values in the scanned data. NaN, if the field - # has a NaN. - # @!attribute [rw] standard_deviation - # @return [::Float] - # Standard deviation of non-null values in the scanned data. NaN, if - # the field has a NaN. - # @!attribute [rw] min - # @return [::Integer] - # Minimum of non-null values in the scanned data. NaN, if the field - # has a NaN. - # @!attribute [rw] quartiles - # @return [::Array<::Integer>] - # 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. - # @!attribute [rw] max - # @return [::Integer] - # Maximum of non-null values in the scanned data. NaN, if the field - # has a NaN. - class IntegerFieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The profile information for a double type field. - # @!attribute [rw] average - # @return [::Float] - # Average of non-null values in the scanned data. NaN, if the field - # has a NaN. - # @!attribute [rw] standard_deviation - # @return [::Float] - # Standard deviation of non-null values in the scanned data. NaN, if - # the field has a NaN. - # @!attribute [rw] min - # @return [::Float] - # Minimum of non-null values in the scanned data. NaN, if the field - # has a NaN. - # @!attribute [rw] quartiles - # @return [::Array<::Float>] - # 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. - # @!attribute [rw] max - # @return [::Float] - # Maximum of non-null values in the scanned data. NaN, if the field - # has a NaN. - class DoubleFieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Top N non-null values in the scanned data. - # @!attribute [rw] value - # @return [::String] - # String value of a top N non-null value. - # @!attribute [rw] count - # @return [::Integer] - # Count of the corresponding value in the scanned data. - # @!attribute [rw] ratio - # @return [::Float] - # Ratio of the corresponding value in the field against the total - # number of rows in the scanned data. - class TopNValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - - # The result of post scan actions of DataProfileScan job. - # @!attribute [r] bigquery_export_result - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult::BigQueryExportResult] - # Output only. The result of BigQuery export post scan action. - class PostScanActionsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of BigQuery export post scan action. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult::BigQueryExportResult::State] - # Output only. Execution state for the BigQuery exporting. - # @!attribute [r] message - # @return [::String] - # Output only. Additional information about the BigQuery exporting. - class BigQueryExportResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution state for the exporting. - module 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 - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb deleted file mode 100644 index ee7c3444912d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb +++ /dev/null @@ -1,540 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # DataQualityScan related setting. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRule>] - # Required. The list of rules to evaluate against a data source. At least one - # rule is required. - # @!attribute [rw] sampling_percent - # @return [::Float] - # 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. - # @!attribute [rw] row_filter - # @return [::String] - # 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 - # @!attribute [rw] post_scan_actions - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions] - # Optional. Actions to take upon job completion. - class DataQualitySpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration of post scan actions of DataQualityScan. - # @!attribute [rw] bigquery_export - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::BigQueryExport] - # Optional. If set, results will be exported to the provided BigQuery - # table. - # @!attribute [rw] notification_report - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::NotificationReport] - # Optional. If set, results will be sent to the provided notification - # receipts upon triggers. - class PostScanActions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration of BigQuery export post scan action. - # @!attribute [rw] results_table - # @return [::String] - # Optional. The BigQuery table to export DataQualityScan results to. - # Format: - # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - class BigQueryExport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The individuals or groups who are designated to receive notifications - # upon triggers. - # @!attribute [rw] emails - # @return [::Array<::String>] - # Optional. The email recipients who will receive the DataQualityScan - # results report. - class Recipients - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This trigger is triggered when the DQ score in the job result is less - # than a specified input score. - # @!attribute [rw] score_threshold - # @return [::Float] - # Optional. The score range is in [0,100]. - class ScoreThresholdTrigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This trigger is triggered when the scan job itself fails, regardless of - # the result. - class JobFailureTrigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This trigger is triggered whenever a scan job run ends, regardless - # of the result. - class JobEndTrigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration of notification report post scan action. - # @!attribute [rw] recipients - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::Recipients] - # Required. The recipients who will receive the notification report. - # @!attribute [rw] score_threshold_trigger - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::ScoreThresholdTrigger] - # Optional. If set, report will be sent when score threshold is met. - # @!attribute [rw] job_failure_trigger - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::JobFailureTrigger] - # Optional. If set, report will be sent when a scan job fails. - # @!attribute [rw] job_end_trigger - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::JobEndTrigger] - # Optional. If set, report will be sent when a scan job ends. - class NotificationReport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # The output of a DataQualityScan. - # @!attribute [rw] passed - # @return [::Boolean] - # Overall data quality result -- `true` if all rules passed. - # @!attribute [r] score - # @return [::Float] - # Output only. The overall data quality score. - # - # The score ranges between [0, 100] (up to two decimal points). - # @!attribute [rw] dimensions - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityDimensionResult>] - # 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. - # @!attribute [r] columns - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityColumnResult>] - # 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. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRuleResult>] - # A list of all the rules in a job, and their results. - # @!attribute [rw] row_count - # @return [::Integer] - # The count of rows processed. - # @!attribute [rw] scanned_data - # @return [::Google::Cloud::Dataplex::V1::ScannedData] - # The data scanned for this result. - # @!attribute [r] post_scan_actions_result - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult] - # Output only. The result of post scan actions. - class DataQualityResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of post scan actions of DataQualityScan job. - # @!attribute [r] bigquery_export_result - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult::BigQueryExportResult] - # Output only. The result of BigQuery export post scan action. - class PostScanActionsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of BigQuery export post scan action. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult::BigQueryExportResult::State] - # Output only. Execution state for the BigQuery exporting. - # @!attribute [r] message - # @return [::String] - # Output only. Additional information about the BigQuery exporting. - class BigQueryExportResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution state for the exporting. - module 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 - end - end - end - end - - # DataQualityRuleResult provides a more detailed, per-rule view of the results. - # @!attribute [rw] rule - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule] - # The rule specified in the DataQualitySpec, as is. - # @!attribute [rw] passed - # @return [::Boolean] - # Whether the rule passed or failed. - # @!attribute [rw] evaluated_count - # @return [::Integer] - # 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`. - # @!attribute [rw] passed_count - # @return [::Integer] - # The number of rows which passed a rule evaluation. - # - # This field is only valid for row-level type rules. - # @!attribute [rw] null_count - # @return [::Integer] - # The number of rows with null values in the specified column. - # @!attribute [rw] pass_ratio - # @return [::Float] - # The ratio of **passed_count / evaluated_count**. - # - # This field is only valid for row-level type rules. - # @!attribute [rw] failing_rows_query - # @return [::String] - # The query to find rows that did not pass this rule. - # - # This field is only valid for row-level type rules. - # @!attribute [r] assertion_row_count - # @return [::Integer] - # Output only. The number of rows returned by the sql statement in the - # SqlAssertion rule. - # - # This field is only valid for SqlAssertion rules. - class DataQualityRuleResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataQualityDimensionResult provides a more detailed, per-dimension view of - # the results. - # @!attribute [r] dimension - # @return [::Google::Cloud::Dataplex::V1::DataQualityDimension] - # Output only. The dimension config specified in the DataQualitySpec, as is. - # @!attribute [rw] passed - # @return [::Boolean] - # Whether the dimension passed or failed. - # @!attribute [r] score - # @return [::Float] - # 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). - class DataQualityDimensionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A dimension captures data quality intent about a defined subset of the rules - # specified. - # @!attribute [rw] name - # @return [::String] - # The dimension name a rule belongs to. Supported dimensions are - # ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", - # "INTEGRITY"] - class DataQualityDimension - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A rule captures data quality intent about a data source. - # @!attribute [rw] range_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RangeExpectation] - # Row-level rule which evaluates whether each column value lies between a - # specified range. - # @!attribute [rw] non_null_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::NonNullExpectation] - # Row-level rule which evaluates whether each column value is null. - # @!attribute [rw] set_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::SetExpectation] - # Row-level rule which evaluates whether each column value is contained by - # a specified set. - # @!attribute [rw] regex_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RegexExpectation] - # Row-level rule which evaluates whether each column value matches a - # specified regex. - # @!attribute [rw] uniqueness_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::UniquenessExpectation] - # Row-level rule which evaluates whether each column value is unique. - # @!attribute [rw] statistic_range_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation] - # Aggregate rule which evaluates whether the column aggregate - # statistic lies between a specified range. - # @!attribute [rw] row_condition_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RowConditionExpectation] - # Row-level rule which evaluates whether each row in a table passes the - # specified condition. - # @!attribute [rw] table_condition_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation] - # Aggregate rule which evaluates whether the provided expression is true - # for a table. - # @!attribute [rw] sql_assertion - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion] - # Aggregate rule which evaluates the number of rows returned for the - # provided statement. - # @!attribute [rw] column - # @return [::String] - # Optional. The unnested column which this rule is evaluated against. - # @!attribute [rw] ignore_null - # @return [::Boolean] - # 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 - # @!attribute [rw] dimension - # @return [::String] - # Required. The dimension a rule belongs to. Results are also aggregated at - # the dimension level. Supported dimensions are **["COMPLETENESS", - # "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** - # @!attribute [rw] threshold - # @return [::Float] - # 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. - # @!attribute [rw] name - # @return [::String] - # 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. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the rule. - # - # * The maximum length is 1,024 characters. - class DataQualityRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Evaluates whether each column value lies between a specified range. - # @!attribute [rw] min_value - # @return [::String] - # 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. - # @!attribute [rw] max_value - # @return [::String] - # 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. - # @!attribute [rw] strict_min_enabled - # @return [::Boolean] - # 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. - # @!attribute [rw] strict_max_enabled - # @return [::Boolean] - # 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. - class RangeExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether each column value is null. - class NonNullExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether each column value is contained by a specified set. - # @!attribute [rw] values - # @return [::Array<::String>] - # Optional. Expected values for the column value. - class SetExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether each column value matches a specified regex. - # @!attribute [rw] regex - # @return [::String] - # Optional. A regular expression the column value is expected to match. - class RegexExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether the column has duplicates. - class UniquenessExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether the column aggregate statistic lies between a specified - # range. - # @!attribute [rw] statistic - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic] - # Optional. The aggregate metric to evaluate. - # @!attribute [rw] min_value - # @return [::String] - # 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. - # @!attribute [rw] max_value - # @return [::String] - # 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. - # @!attribute [rw] strict_min_enabled - # @return [::Boolean] - # 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. - # @!attribute [rw] strict_max_enabled - # @return [::Boolean] - # 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. - class StatisticRangeExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of aggregate metrics a rule can be evaluated against. - module 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 - end - end - - # 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 - # @!attribute [rw] sql_expression - # @return [::String] - # Optional. The SQL expression. - class RowConditionExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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 - # @!attribute [rw] sql_expression - # @return [::String] - # Optional. The SQL expression. - class TableConditionExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Queries for rows returned by the provided SQL statement. If any rows are - # are returned, this rule fails. - # - # The SQL statement needs to use BigQuery standard SQL syntax, and must not - # contain any semicolons. - # - # $\\{data()} can be used to reference the rows being evaluated, i.e. the table - # after all additional filters (row filters, incremental data filters, - # sampling) are applied. - # - # Example: SELECT * FROM $\\{data()} WHERE price < 0 - # @!attribute [rw] sql_statement - # @return [::String] - # Optional. The SQL statement. - class SqlAssertion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # DataQualityColumnResult provides a more detailed, per-column view of - # the results. - # @!attribute [r] column - # @return [::String] - # Output only. The column specified in the DataQualityRule. - # @!attribute [r] score - # @return [::Float] - # 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). - class DataQualityColumnResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb deleted file mode 100644 index 072f86b2fcd8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb +++ /dev/null @@ -1,565 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # 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. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the DataTaxonomy, of the form: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id}. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataTaxonomy was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataTaxonomy was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the DataTaxonomy. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the DataTaxonomy. - # @!attribute [r] attribute_count - # @return [::Integer] - # Output only. The number of attributes in the DataTaxonomy. - # @!attribute [rw] etag - # @return [::String] - # 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. - # @!attribute [r] class_count - # @return [::Integer] - # Output only. The number of classes in the DataTaxonomy. - class DataTaxonomy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # 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 - # ``` - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the dataAttribute, of the form: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id}. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataAttribute was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataAttribute was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the DataAttribute. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the DataAttribute. - # @!attribute [rw] parent_id - # @return [::String] - # 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] - # @!attribute [r] attribute_count - # @return [::Integer] - # Output only. The number of child attributes present for this attribute. - # @!attribute [rw] etag - # @return [::String] - # 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. - # @!attribute [rw] resource_access_spec - # @return [::Google::Cloud::Dataplex::V1::ResourceAccessSpec] - # Optional. Specified when applied to a resource (eg: Cloud Storage bucket, - # BigQuery dataset, BigQuery table). - # @!attribute [rw] data_access_spec - # @return [::Google::Cloud::Dataplex::V1::DataAccessSpec] - # Optional. Specified when applied to data stored on the resource (eg: rows, - # columns in BigQuery Tables). - class DataAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # DataAttributeBinding represents binding of attributes to resources. Eg: Bind - # 'CustomerInfo' entity with 'PII' attribute. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the Data Attribute Binding, of - # the form: - # projects/\\{project_number}/locations/\\{location}/dataAttributeBindings/\\{data_attribute_binding_id} - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataAttributeBinding was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataAttributeBinding was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the DataAttributeBinding. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the DataAttributeBinding. - # @!attribute [rw] etag - # @return [::String] - # 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. - # @!attribute [rw] resource - # @return [::String] - # 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. - # @!attribute [rw] attributes - # @return [::Array<::String>] - # Optional. List of attributes to be associated with the resource, provided - # in the form: - # projects/\\{project}/locations/\\{location}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @!attribute [rw] paths - # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttributeBinding::Path>] - # Optional. The list of paths for items within the associated resource (eg. - # columns and partitions within a table) along with attribute bindings. - class DataAttributeBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a subresource of the given resource, and associated bindings - # with it. Currently supported subresources are column and partition schema - # fields within a table. - # @!attribute [rw] name - # @return [::String] - # Required. The name identifier of the path. - # Nested columns should be of the form: 'address.city'. - # @!attribute [rw] attributes - # @return [::Array<::String>] - # 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} - class Path - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Create DataTaxonomy request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] data_taxonomy_id - # @return [::String] - # 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. - # @!attribute [rw] data_taxonomy - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # Required. DataTaxonomy resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateDataTaxonomyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update DataTaxonomy request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] data_taxonomy - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # Required. Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateDataTaxonomyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get DataTaxonomy request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - class GetDataTaxonomyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataTaxonomies request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListDataTaxonomiesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataTaxonomies response. - # @!attribute [rw] data_taxonomies - # @return [::Array<::Google::Cloud::Dataplex::V1::DataTaxonomy>] - # DataTaxonomies under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataTaxonomiesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete DataTaxonomy request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value,the DeleteDataTaxonomy method returns an ABORTED error. - class DeleteDataTaxonomyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create DataAttribute request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @!attribute [rw] data_attribute_id - # @return [::String] - # 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. - # @!attribute [rw] data_attribute - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # Required. DataAttribute resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateDataAttributeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update DataAttribute request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] data_attribute - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # Required. Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateDataAttributeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get DataAttribute request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - class GetDataAttributeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataAttributes request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListDataAttributesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataAttributes response. - # @!attribute [rw] data_attributes - # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttribute>] - # DataAttributes under the given parent DataTaxonomy. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataAttributesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete DataAttribute request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteDataAttribute method returns an ABORTED error response. - class DeleteDataAttributeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create DataAttributeBinding request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id} - # @!attribute [rw] data_attribute_binding_id - # @return [::String] - # 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. - # @!attribute [rw] data_attribute_binding - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # Required. DataAttributeBinding resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateDataAttributeBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update DataAttributeBinding request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] data_attribute_binding - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # Required. Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateDataAttributeBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get DataAttributeBinding request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - class GetDataAttributeBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataAttributeBindings request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the Location: - # projects/\\{project_number}/locations/\\{location_id} - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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" - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListDataAttributeBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataAttributeBindings response. - # @!attribute [rw] data_attribute_bindings - # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] - # DataAttributeBindings under the given parent Location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataAttributeBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete DataAttributeBinding request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # @!attribute [rw] etag - # @return [::String] - # 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. - class DeleteDataAttributeBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb deleted file mode 100644 index 866900dcba0c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb +++ /dev/null @@ -1,474 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # Create dataScan request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] data_scan - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # Required. DataScan resource. - # @!attribute [rw] data_scan_id - # @return [::String] - # 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. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - class CreateDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update dataScan request. - # @!attribute [rw] data_scan - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # Required. DataScan resource to be updated. - # - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - class UpdateDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete dataScan request. - # @!attribute [rw] name - # @return [::String] - # 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. - class DeleteDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get dataScan request. - # @!attribute [rw] name - # @return [::String] - # 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. - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] - # Optional. Select the DataScan view to return. Defaults to `BASIC`. - class GetDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # DataScan view options. - module 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 - end - end - - # List dataScans request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - class ListDataScansRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List dataScans response. - # @!attribute [rw] data_scans - # @return [::Array<::Google::Cloud::Dataplex::V1::DataScan>] - # DataScans (`BASIC` view only) under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataScansResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Run DataScan Request - # @!attribute [rw] name - # @return [::String] - # 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. - class RunDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Run DataScan Response. - # @!attribute [rw] job - # @return [::Google::Cloud::Dataplex::V1::DataScanJob] - # DataScanJob created by RunDataScan request. - class RunDataScanResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get DataScanJob request. - # @!attribute [rw] name - # @return [::String] - # 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. - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] - # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - class GetDataScanJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # DataScanJob view options. - module 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 - end - end - - # List DataScanJobs request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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. - class ListDataScanJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataScanJobs response. - # @!attribute [rw] data_scan_jobs - # @return [::Array<::Google::Cloud::Dataplex::V1::DataScanJob>] - # DataScanJobs (`BASIC` view only) under a given dataScan. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListDataScanJobsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Generate recommended DataQualityRules request. - # @!attribute [rw] name - # @return [::String] - # Required. The name should be either - # * the name of a datascan with at least one successful completed data - # profiling job, or - # * the name of a successful completed data profiling datascan job. - class GenerateDataQualityRulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Generate recommended DataQualityRules response. - # @!attribute [rw] rule - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRule>] - # Generated recommended \\{@link DataQualityRule}s. - class GenerateDataQualityRulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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). - # @!attribute [r] name - # @return [::String] - # 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. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the scan. - # - # * Must be between 1-1024 characters. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # - # * Must be between 1-256 characters. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the scan. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the DataScan. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the scan was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the scan was last updated. - # @!attribute [rw] data - # @return [::Google::Cloud::Dataplex::V1::DataSource] - # Required. The data source for DataScan. - # @!attribute [rw] execution_spec - # @return [::Google::Cloud::Dataplex::V1::DataScan::ExecutionSpec] - # Optional. DataScan execution settings. - # - # If not specified, the fields in it will use their default values. - # @!attribute [r] execution_status - # @return [::Google::Cloud::Dataplex::V1::DataScan::ExecutionStatus] - # Output only. Status of the data scan execution. - # @!attribute [r] type - # @return [::Google::Cloud::Dataplex::V1::DataScanType] - # Output only. The type of DataScan. - # @!attribute [rw] data_quality_spec - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec] - # DataQualityScan related setting. - # @!attribute [rw] data_profile_spec - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec] - # DataProfileScan related setting. - # @!attribute [r] data_quality_result - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult] - # Output only. The result of the data quality scan. - # @!attribute [r] data_profile_result - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult] - # Output only. The result of the data profile scan. - class DataScan - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # DataScan execution settings. - # @!attribute [rw] trigger - # @return [::Google::Cloud::Dataplex::V1::Trigger] - # 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. - # @!attribute [rw] field - # @return [::String] - # 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. - class ExecutionSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of the data scan execution. - # @!attribute [rw] latest_job_start_time - # @return [::Google::Protobuf::Timestamp] - # The time when the latest DataScanJob started. - # @!attribute [rw] latest_job_end_time - # @return [::Google::Protobuf::Timestamp] - # The time when the latest DataScanJob ended. - class ExecutionStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A DataScanJob represents an instance of DataScan execution. - # @!attribute [r] name - # @return [::String] - # 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. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the DataScanJob. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataScanJob was started. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataScanJob ended. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::DataScanJob::State] - # Output only. Execution state for the DataScanJob. - # @!attribute [r] message - # @return [::String] - # Output only. Additional information about the current state. - # @!attribute [r] type - # @return [::Google::Cloud::Dataplex::V1::DataScanType] - # Output only. The type of the parent DataScan. - # @!attribute [r] data_quality_spec - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec] - # Output only. DataQualityScan related setting. - # @!attribute [r] data_profile_spec - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec] - # Output only. DataProfileScan related setting. - # @!attribute [r] data_quality_result - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult] - # Output only. The result of the data quality scan. - # @!attribute [r] data_profile_result - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult] - # Output only. The result of the data profile scan. - class DataScanJob - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution state for the DataScanJob. - module 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 - end - end - - # The type of DataScan. - module DataScanType - # The DataScan type is unspecified. - DATA_SCAN_TYPE_UNSPECIFIED = 0 - - # Data Quality scan. - DATA_QUALITY = 1 - - # Data Profile scan. - DATA_PROFILE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb deleted file mode 100644 index 87e2a85289cf..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb +++ /dev/null @@ -1,814 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # The payload associated with Discovery data processing. - # @!attribute [rw] message - # @return [::String] - # The log message. - # @!attribute [rw] lake_id - # @return [::String] - # The id of the associated lake. - # @!attribute [rw] zone_id - # @return [::String] - # The id of the associated zone. - # @!attribute [rw] asset_id - # @return [::String] - # The id of the associated asset. - # @!attribute [rw] data_location - # @return [::String] - # The data location associated with the event. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EventType] - # The type of the event being logged. - # @!attribute [rw] config - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::ConfigDetails] - # Details about discovery configuration in effect. - # @!attribute [rw] entity - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityDetails] - # Details about the entity associated with the event. - # @!attribute [rw] partition - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::PartitionDetails] - # Details about the partition associated with the event. - # @!attribute [rw] action - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::ActionDetails] - # Details about the action associated with the event. - class DiscoveryEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Details about configuration events. - # @!attribute [rw] parameters - # @return [::Google::Protobuf::Map{::String => ::String}] - # A list of discovery configuration parameters in effect. - # The keys are the field paths within DiscoverySpec. - # Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, - # etc. - class ConfigDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParametersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details about the entity. - # @!attribute [rw] entity - # @return [::String] - # The name of the entity resource. - # The name is the fully-qualified resource name. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityType] - # The type of the entity resource. - class EntityDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about the partition. - # @!attribute [rw] partition - # @return [::String] - # The name to the partition resource. - # The name is the fully-qualified resource name. - # @!attribute [rw] entity - # @return [::String] - # The name to the containing entity resource. - # The name is the fully-qualified resource name. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityType] - # The type of the containing entity resource. - # @!attribute [rw] sampled_data_locations - # @return [::Array<::String>] - # The locations of the data items (e.g., a Cloud Storage objects) sampled - # for metadata inference. - class PartitionDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about the action. - # @!attribute [rw] type - # @return [::String] - # The type of action. - # Eg. IncompatibleDataSchema, InvalidDataFormat - class ActionDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of the event. - module 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 - end - - # The type of the entity. - module EntityType - # An unspecified event type. - ENTITY_TYPE_UNSPECIFIED = 0 - - # Entities representing structured data. - TABLE = 1 - - # Entities representing unstructured data. - FILESET = 2 - end - end - - # The payload associated with Job logs that contains events describing jobs - # that have run within a Lake. - # @!attribute [rw] message - # @return [::String] - # The log message. - # @!attribute [rw] job_id - # @return [::String] - # The unique id identifying the job. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time when the job started running. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time when the job ended running. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::JobEvent::State] - # The job state on completion. - # @!attribute [rw] retries - # @return [::Integer] - # The number of retries. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::JobEvent::Type] - # The type of the job. - # @!attribute [rw] service - # @return [::Google::Cloud::Dataplex::V1::JobEvent::Service] - # The service used to execute the job. - # @!attribute [rw] service_job - # @return [::String] - # The reference to the job within the service. - # @!attribute [rw] execution_trigger - # @return [::Google::Cloud::Dataplex::V1::JobEvent::ExecutionTrigger] - # Job execution trigger. - class JobEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the job. - module Type - # Unspecified job type. - TYPE_UNSPECIFIED = 0 - - # Spark jobs. - SPARK = 1 - - # Notebook jobs. - NOTEBOOK = 2 - end - - # The completion status of the job. - module 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 - end - - # The service used to execute the job. - module Service - # Unspecified service. - SERVICE_UNSPECIFIED = 0 - - # Cloud Dataproc. - DATAPROC = 1 - end - - # Job Execution trigger. - module 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 - end - end - - # These messages contain information about sessions within an environment. - # The monitored resource is 'Environment'. - # @!attribute [rw] message - # @return [::String] - # The log message. - # @!attribute [rw] user_id - # @return [::String] - # The information about the user that created the session. It will be the - # email address of the user. - # @!attribute [rw] session_id - # @return [::String] - # Unique identifier for the session. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::SessionEvent::EventType] - # The type of the event. - # @!attribute [rw] query - # @return [::Google::Cloud::Dataplex::V1::SessionEvent::QueryDetail] - # The execution details of the query. - # @!attribute [rw] event_succeeded - # @return [::Boolean] - # The status of the event. - # @!attribute [rw] fast_startup_enabled - # @return [::Boolean] - # If the session is associated with an environment with fast startup enabled, - # and was created before being assigned to a user. - # @!attribute [rw] unassigned_duration - # @return [::Google::Protobuf::Duration] - # The idle duration of a warm pooled session before it is assigned to user. - class SessionEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution details of the query. - # @!attribute [rw] query_id - # @return [::String] - # The unique Query id identifying the query. - # @!attribute [rw] query_text - # @return [::String] - # The query text executed. - # @!attribute [rw] engine - # @return [::Google::Cloud::Dataplex::V1::SessionEvent::QueryDetail::Engine] - # Query Execution engine. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # Time taken for execution of the query. - # @!attribute [rw] result_size_bytes - # @return [::Integer] - # The size of results the query produced. - # @!attribute [rw] data_processed_bytes - # @return [::Integer] - # The data processed by the query. - class QueryDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Query Execution engine. - module 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 - end - end - - # The type of the event. - module 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 - end - end - - # Payload associated with Governance related log events. - # @!attribute [rw] message - # @return [::String] - # The log message. - # @!attribute [rw] event_type - # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::EventType] - # The type of the event. - # @!attribute [rw] entity - # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::Entity] - # Entity resource information if the log event is associated with a - # specific entity. - class GovernanceEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about Entity resource that the log event is associated with. - # @!attribute [rw] entity - # @return [::String] - # 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}` - # @!attribute [rw] entity_type - # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::Entity::EntityType] - # Type of entity. - class Entity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of entity. - module EntityType - # An unspecified Entity type. - ENTITY_TYPE_UNSPECIFIED = 0 - - # Table entity type. - TABLE = 1 - - # Fileset entity type. - FILESET = 2 - end - end - - # Type of governance log event. - module 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 - end - end - - # These messages contain information about the execution of a datascan. - # The monitored resource is 'DataScan' - # Next ID: 13 - # @!attribute [rw] data_source - # @return [::String] - # The data source of the data scan - # @!attribute [rw] job_id - # @return [::String] - # The identifier of the specific data scan job this log entry is for. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the data scan job was created. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time when the data scan job started to run. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time when the data scan job finished. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::ScanType] - # The type of the data scan. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::State] - # The status of the data scan job. - # @!attribute [rw] message - # @return [::String] - # The message describing the data scan job event. - # @!attribute [rw] spec_version - # @return [::String] - # A version identifier of the spec which was used to execute this job. - # @!attribute [rw] trigger - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::Trigger] - # The trigger type of the data scan job. - # @!attribute [rw] scope - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::Scope] - # The scope of the data scan (e.g. full, incremental). - # @!attribute [rw] data_profile - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataProfileResult] - # Data profile result for data profile type data scan. - # @!attribute [rw] data_quality - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataQualityResult] - # Data quality result for data quality type data scan. - # @!attribute [rw] data_profile_configs - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataProfileAppliedConfigs] - # Applied configs for data profile type data scan. - # @!attribute [rw] data_quality_configs - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataQualityAppliedConfigs] - # Applied configs for data quality type data scan. - # @!attribute [rw] post_scan_actions_result - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult] - # The result of post scan actions. - class DataScanEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Data profile result for data scan job. - # @!attribute [rw] row_count - # @return [::Integer] - # The count of rows processed in the data scan job. - class DataProfileResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Data quality result for data scan job. - # @!attribute [rw] row_count - # @return [::Integer] - # The count of rows processed in the data scan job. - # @!attribute [rw] passed - # @return [::Boolean] - # Whether the data quality result was `pass` or not. - # @!attribute [rw] dimension_passed - # @return [::Google::Protobuf::Map{::String => ::Boolean}] - # 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. - # @!attribute [rw] score - # @return [::Float] - # The table-level data quality score for the data scan job. - # - # The data quality score ranges between [0, 100] (up to two decimal - # points). - # @!attribute [rw] dimension_score - # @return [::Google::Protobuf::Map{::String => ::Float}] - # 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). - # @!attribute [rw] column_score - # @return [::Google::Protobuf::Map{::String => ::Float}] - # 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). - class DataQualityResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Boolean] - class DimensionPassedEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Float] - class DimensionScoreEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Float] - class ColumnScoreEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Applied configs for data profile type data scan job. - # @!attribute [rw] sampling_percent - # @return [::Float] - # 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. - # @!attribute [rw] row_filter_applied - # @return [::Boolean] - # Boolean indicating whether a row filter was applied in the DataScan job. - # @!attribute [rw] column_filter_applied - # @return [::Boolean] - # Boolean indicating whether a column filter was applied in the DataScan - # job. - class DataProfileAppliedConfigs - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Applied configs for data quality type data scan job. - # @!attribute [rw] sampling_percent - # @return [::Float] - # 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. - # @!attribute [rw] row_filter_applied - # @return [::Boolean] - # Boolean indicating whether a row filter was applied in the DataScan job. - class DataQualityAppliedConfigs - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Post scan actions result for data scan job. - # @!attribute [rw] bigquery_export_result - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult::BigQueryExportResult] - # The result of BigQuery export post scan action. - class PostScanActionsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of BigQuery export post scan action. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult::BigQueryExportResult::State] - # Execution state for the BigQuery exporting. - # @!attribute [rw] message - # @return [::String] - # Additional information about the BigQuery exporting. - class BigQueryExportResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution state for the exporting. - module 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 - end - end - end - - # The type of the data scan. - module 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 - end - - # The job state of the data scan. - module 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 - end - - # The trigger type for the data scan. - module Trigger - # An unspecified trigger type. - TRIGGER_UNSPECIFIED = 0 - - # Data scan triggers on demand. - ON_DEMAND = 1 - - # Data scan triggers as per schedule. - SCHEDULE = 2 - end - - # The scope of job for the data scan. - module 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 - end - end - - # Information about the result of a data quality rule for data quality scan. - # The monitored resource is 'DataScan'. - # @!attribute [rw] job_id - # @return [::String] - # Identifier of the specific data scan job this log entry is for. - # @!attribute [rw] data_source - # @return [::String] - # The data source of the data scan (e.g. BigQuery table name). - # @!attribute [rw] column - # @return [::String] - # The column which this rule is evaluated against. - # @!attribute [rw] rule_name - # @return [::String] - # The name of the data quality rule. - # @!attribute [rw] rule_type - # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::RuleType] - # The type of the data quality rule. - # @!attribute [rw] evalution_type - # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::EvaluationType] - # The evaluation type of the data quality rule. - # @!attribute [rw] rule_dimension - # @return [::String] - # The dimension of the data quality rule. - # @!attribute [rw] threshold_percent - # @return [::Float] - # The passing threshold ([0.0, 100.0]) of the data quality rule. - # @!attribute [rw] result - # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::Result] - # The result of the data quality rule. - # @!attribute [rw] evaluated_row_count - # @return [::Integer] - # The number of rows evaluated against the data quality rule. - # This field is only valid for rules of PER_ROW evaluation type. - # @!attribute [rw] passed_row_count - # @return [::Integer] - # The number of rows which passed a rule evaluation. - # This field is only valid for rules of PER_ROW evaluation type. - # @!attribute [rw] null_row_count - # @return [::Integer] - # The number of rows with null values in the specified column. - # @!attribute [rw] assertion_row_count - # @return [::Integer] - # The number of rows returned by the sql statement in the SqlAssertion rule. - # This field is only valid for SqlAssertion rules. - class DataQualityScanRuleResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the data quality rule. - module RuleType - # An unspecified rule type. - RULE_TYPE_UNSPECIFIED = 0 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#nonnullexpectation. - NON_NULL_EXPECTATION = 1 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rangeexpectation. - RANGE_EXPECTATION = 2 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#regexexpectation. - REGEX_EXPECTATION = 3 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rowconditionexpectation. - ROW_CONDITION_EXPECTATION = 4 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#setexpectation. - SET_EXPECTATION = 5 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#statisticrangeexpectation. - STATISTIC_RANGE_EXPECTATION = 6 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#tableconditionexpectation. - TABLE_CONDITION_EXPECTATION = 7 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#uniquenessexpectation. - UNIQUENESS_EXPECTATION = 8 - - # Please see - # https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#sqlAssertion. - SQL_ASSERTION = 9 - end - - # The evaluation type of the data quality rule. - module 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 - end - - # Whether the data quality rule passed or failed. - module Result - # An unspecified result. - RESULT_UNSPECIFIED = 0 - - # The data quality rule passed. - PASSED = 1 - - # The data quality rule failed. - FAILED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb deleted file mode 100644 index 53866289671e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb +++ /dev/null @@ -1,733 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # Create a metadata entity request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] entity - # @return [::Google::Cloud::Dataplex::V1::Entity] - # Required. Entity resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateEntityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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. - # @!attribute [rw] entity - # @return [::Google::Cloud::Dataplex::V1::Entity] - # Required. Update description. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateEntityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete a metadata entity request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @!attribute [rw] etag - # @return [::String] - # Required. The etag associated with the entity, which can be retrieved with - # a [GetEntity][] request. - class DeleteEntityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List metadata entities request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] - # Required. Specify the entity view to make a partial list request. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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" - class ListEntitiesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Entity views. - module 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 - end - end - - # List metadata entities response. - # @!attribute [rw] entities - # @return [::Array<::Google::Cloud::Dataplex::V1::Entity>] - # Entities in the specified parent zone. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # remaining results in the list. - class ListEntitiesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get metadata entity request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] - # Optional. Used to select the subset of entity information to return. - # Defaults to `BASIC`. - class GetEntityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Entity views for get entity partial result. - module 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 - end - end - - # List metadata partitions request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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. - class ListPartitionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create metadata partition request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @!attribute [rw] partition - # @return [::Google::Cloud::Dataplex::V1::Partition] - # Required. Partition resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreatePartitionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete metadata partition request. - # @!attribute [rw] name - # @return [::String] - # 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. - # @!attribute [rw] etag - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. The etag associated with the partition. - class DeletePartitionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List metadata partitions response. - # @!attribute [rw] partitions - # @return [::Array<::Google::Cloud::Dataplex::V1::Partition>] - # Partitions under the specified parent entity. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # remaining results in the list. - class ListPartitionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get metadata partition request. - # @!attribute [rw] name - # @return [::String] - # 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. - class GetPartitionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents tables and fileset metadata contained within a zone. - # @!attribute [r] name - # @return [::String] - # 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}`. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Display name must be shorter than or equal to 256 characters. - # @!attribute [rw] description - # @return [::String] - # Optional. User friendly longer description text. Must be shorter than or - # equal to 1024 characters. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the entity was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the entity was last updated. - # @!attribute [rw] id - # @return [::String] - # 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. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag associated with the entity, which can be retrieved with - # a [GetEntity][] request. Required for update and delete requests. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Entity::Type] - # Required. Immutable. The type of entity. - # @!attribute [rw] asset - # @return [::String] - # 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. - # @!attribute [rw] data_path - # @return [::String] - # 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`. - # @!attribute [rw] data_path_pattern - # @return [::String] - # 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`. - # @!attribute [r] catalog_entry - # @return [::String] - # Output only. The name of the associated Data Catalog entry. - # @!attribute [rw] system - # @return [::Google::Cloud::Dataplex::V1::StorageSystem] - # Required. Immutable. Identifies the storage system of the entity data. - # @!attribute [rw] format - # @return [::Google::Cloud::Dataplex::V1::StorageFormat] - # Required. Identifies the storage format of the entity data. - # It does not apply to entities with data stored in BigQuery. - # @!attribute [r] compatibility - # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus] - # Output only. Metadata stores that the entity is compatible with. - # @!attribute [r] access - # @return [::Google::Cloud::Dataplex::V1::StorageAccess] - # Output only. Identifies the access mechanism to the entity. Not user - # settable. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [rw] schema - # @return [::Google::Cloud::Dataplex::V1::Schema] - # 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. - class Entity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Provides compatibility information for various metadata stores. - # @!attribute [r] hive_metastore - # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus::Compatibility] - # Output only. Whether this entity is compatible with Hive Metastore. - # @!attribute [r] bigquery - # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus::Compatibility] - # Output only. Whether this entity is compatible with BigQuery. - class CompatibilityStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Provides compatibility information for a specific metadata store. - # @!attribute [r] compatible - # @return [::Boolean] - # Output only. Whether the entity is compatible and can be represented in - # the metadata store. - # @!attribute [r] reason - # @return [::String] - # Output only. Provides additional detail if the entity is incompatible - # with the metadata store. - class Compatibility - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The type of entity. - module Type - # Type unspecified. - TYPE_UNSPECIFIED = 0 - - # Structured and semi-structured data. - TABLE = 1 - - # Unstructured data. - FILESET = 2 - end - end - - # Represents partition metadata contained within entity instances. - # @!attribute [r] name - # @return [::String] - # 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. - # @!attribute [rw] values - # @return [::Array<::String>] - # Required. Immutable. The set of values representing the partition, which - # correspond to the partition schema defined in the parent entity. - # @!attribute [rw] location - # @return [::String] - # 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/` - # @!attribute [rw] etag - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. The etag for this partition. - class Partition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Schema information describing the structure and layout of the data. - # @!attribute [rw] user_managed - # @return [::Boolean] - # 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. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>] - # Optional. The sequence of fields describing data in table entities. - # **Note:** BigQuery SchemaFields are immutable. - # @!attribute [rw] partition_fields - # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::PartitionField>] - # Optional. The sequence of fields describing the partition structure in - # entities. If this field is empty, there are no partitions within the data. - # @!attribute [rw] partition_style - # @return [::Google::Cloud::Dataplex::V1::Schema::PartitionStyle] - # Optional. The structure of paths containing partition data within the - # entity. - class Schema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a column field within a table schema. - # @!attribute [rw] name - # @return [::String] - # 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. - # @!attribute [rw] description - # @return [::String] - # Optional. User friendly field description. Must be less than or equal to - # 1024 characters. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Schema::Type] - # Required. The type of field. - # @!attribute [rw] mode - # @return [::Google::Cloud::Dataplex::V1::Schema::Mode] - # Required. Additional field semantics. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>] - # Optional. Any nested field for complex types. - class SchemaField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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. - # @!attribute [rw] name - # @return [::String] - # 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.. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Schema::Type] - # Required. Immutable. The type of field. - class PartitionField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Type information for fields in schemas and partition schemas. - module 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 - end - - # Additional qualifiers to define field semantics. - module 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 - end - - # The structure of paths within the entity, which represent partitions. - module 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 - end - end - - # Describes the format of the data within its storage location. - # @!attribute [r] format - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::Format] - # Output only. The data format associated with the stored data, which - # represents content type values. The value is inferred from mime type. - # @!attribute [rw] compression_format - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::CompressionFormat] - # Optional. The compression type associated with the stored data. - # If unspecified, the data is uncompressed. - # @!attribute [rw] mime_type - # @return [::String] - # 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} - # @!attribute [rw] csv - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::CsvOptions] - # Optional. Additional information about CSV formatted data. - # @!attribute [rw] json - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::JsonOptions] - # Optional. Additional information about CSV formatted data. - # @!attribute [rw] iceberg - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::IcebergOptions] - # Optional. Additional information about iceberg tables. - class StorageFormat - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes CSV and similar semi-structured data formats. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. Accepts "US-ASCII", - # "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. - # @!attribute [rw] header_rows - # @return [::Integer] - # Optional. The number of rows to interpret as header rows that should be - # skipped when reading data rows. Defaults to 0. - # @!attribute [rw] delimiter - # @return [::String] - # Optional. The delimiter used to separate values. Defaults to ','. - # @!attribute [rw] quote - # @return [::String] - # Optional. The character used to quote column values. Accepts '"' - # (double quotation mark) or ''' (single quotation mark). Defaults to - # '"' (double quotation mark) if unspecified. - class CsvOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes JSON data format. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" - # and "ISO-8859-1". Defaults to UTF-8 if not specified. - class JsonOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes Iceberg data format. - # @!attribute [rw] metadata_location - # @return [::String] - # Optional. The location of where the iceberg metadata is present, must be - # within the table path - class IcebergOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specific file format of the data. - module 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 - end - - # The specific compressed file format of the data. - module CompressionFormat - # CompressionFormat unspecified. Implies uncompressed data. - COMPRESSION_FORMAT_UNSPECIFIED = 0 - - # GZip compressed set of files. - GZIP = 2 - - # BZip2 compressed set of files. - BZIP2 = 3 - end - end - - # Describes the access mechanism of the data within its storage location. - # @!attribute [r] read - # @return [::Google::Cloud::Dataplex::V1::StorageAccess::AccessMode] - # Output only. Describes the read access mechanism of the data. Not user - # settable. - class StorageAccess - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Access Mode determines how data stored within the Entity is read. - module 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 - end - end - - # Identifies the cloud system that manages the data storage. - module 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 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb deleted file mode 100644 index 5ca2d5c43e57..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb +++ /dev/null @@ -1,106 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # DataScan scheduling and trigger settings. - # @!attribute [rw] on_demand - # @return [::Google::Cloud::Dataplex::V1::Trigger::OnDemand] - # The scan runs once via `RunDataScan` API. - # @!attribute [rw] schedule - # @return [::Google::Cloud::Dataplex::V1::Trigger::Schedule] - # The scan is scheduled to run periodically. - class Trigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The scan runs once via `RunDataScan` API. - class OnDemand - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The scan is scheduled to run periodically. - # @!attribute [rw] cron - # @return [::String] - # 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. - class Schedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The data source for DataScan. - # @!attribute [rw] entity - # @return [::String] - # 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}`. - # @!attribute [rw] resource - # @return [::String] - # 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 - class DataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The data scanned during processing (e.g. in incremental DataScan) - # @!attribute [rw] incremental_field - # @return [::Google::Cloud::Dataplex::V1::ScannedData::IncrementalField] - # The range denoted by values of an incremental field - class ScannedData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A data range denoted by a pair of start/end values of a field. - # @!attribute [rw] field - # @return [::String] - # The field that contains values which monotonically increases over time - # (e.g. a timestamp column). - # @!attribute [rw] start - # @return [::String] - # Value that marks the start of the range. - # @!attribute [rw] end - # @return [::String] - # Value that marks the end of the range. - class IncrementalField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb deleted file mode 100644 index c60ba4fca1b6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb +++ /dev/null @@ -1,838 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module 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. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the lake, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the lake was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the lake was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the lake. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the lake. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the lake. - # @!attribute [r] service_account - # @return [::String] - # Output only. Service account associated with this lake. This service - # account must be authorized to access or operate on resources managed by the - # lake. - # @!attribute [rw] metastore - # @return [::Google::Cloud::Dataplex::V1::Lake::Metastore] - # Optional. Settings to manage lake and Dataproc Metastore service instance - # association. - # @!attribute [r] asset_status - # @return [::Google::Cloud::Dataplex::V1::AssetStatus] - # Output only. Aggregated status of the underlying assets of the lake. - # @!attribute [r] metastore_status - # @return [::Google::Cloud::Dataplex::V1::Lake::MetastoreStatus] - # Output only. Metastore status of the lake. - class Lake - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings to manage association of Dataproc Metastore with a lake. - # @!attribute [rw] service - # @return [::String] - # 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}` - class Metastore - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of Lake and Dataproc Metastore service instance association. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::Lake::MetastoreStatus::State] - # Current state of association. - # @!attribute [rw] message - # @return [::String] - # Additional information about the current status. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the metastore status of the lake. - # @!attribute [rw] endpoint - # @return [::String] - # The URI of the endpoint used to access the Metastore service. - class MetastoreStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Current state of association. - module 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 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Aggregated status of the underlying assets of a lake or zone. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the status. - # @!attribute [rw] active_assets - # @return [::Integer] - # Number of active assets. - # @!attribute [rw] security_policy_applying_assets - # @return [::Integer] - # Number of assets that are in process of updating the security policy on - # attached resources. - class AssetStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the zone, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the zone was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the zone was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined labels for the zone. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the zone. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the zone. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Zone::Type] - # Required. Immutable. The type of the zone. - # @!attribute [rw] discovery_spec - # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec] - # Optional. Specification of the discovery feature applied to data in this - # zone. - # @!attribute [rw] resource_spec - # @return [::Google::Cloud::Dataplex::V1::Zone::ResourceSpec] - # Required. Specification of the resources that are referenced by the assets - # within this zone. - # @!attribute [r] asset_status - # @return [::Google::Cloud::Dataplex::V1::AssetStatus] - # Output only. Aggregated status of the underlying assets of the zone. - class Zone - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings for resources attached as assets within a zone. - # @!attribute [rw] location_type - # @return [::Google::Cloud::Dataplex::V1::Zone::ResourceSpec::LocationType] - # Required. Immutable. The location type of the resources that are allowed - # to be attached to the assets within this zone. - class ResourceSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Location type of the resources attached to a zone. - module 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 - end - end - - # Settings to manage the metadata discovery and publishing in a zone. - # @!attribute [rw] enabled - # @return [::Boolean] - # Required. Whether discovery is enabled. - # @!attribute [rw] include_patterns - # @return [::Array<::String>] - # 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. - # @!attribute [rw] exclude_patterns - # @return [::Array<::String>] - # 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. - # @!attribute [rw] csv_options - # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec::CsvOptions] - # Optional. Configuration for CSV data. - # @!attribute [rw] json_options - # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec::JsonOptions] - # Optional. Configuration for Json data. - # @!attribute [rw] schedule - # @return [::String] - # 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 * * * *`. - class DiscoverySpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describe CSV and similar semi-structured data formats. - # @!attribute [rw] header_rows - # @return [::Integer] - # Optional. The number of rows to interpret as header rows that should be - # skipped when reading data rows. - # @!attribute [rw] delimiter - # @return [::String] - # Optional. The delimiter being used to separate values. This defaults to - # ','. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. The default is UTF-8. - # @!attribute [rw] disable_type_inference - # @return [::Boolean] - # Optional. Whether to disable the inference of data type for CSV data. - # If true, all columns will be registered as strings. - class CsvOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describe JSON data format. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. The default is UTF-8. - # @!attribute [rw] disable_type_inference - # @return [::Boolean] - # 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). - class JsonOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Type of zone. - module 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 - end - end - - # Action represents an issue requiring administrator action for resolution. - # @!attribute [rw] category - # @return [::Google::Cloud::Dataplex::V1::Action::Category] - # The category of issue associated with the action. - # @!attribute [rw] issue - # @return [::String] - # Detailed description of the issue requiring action. - # @!attribute [rw] detect_time - # @return [::Google::Protobuf::Timestamp] - # The time that the issue was detected. - # @!attribute [r] name - # @return [::String] - # 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}`. - # @!attribute [r] lake - # @return [::String] - # Output only. The relative resource name of the lake, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [r] zone - # @return [::String] - # Output only. The relative resource name of the zone, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [r] asset - # @return [::String] - # 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}`. - # @!attribute [rw] data_locations - # @return [::Array<::String>] - # 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`). - # @!attribute [rw] invalid_data_format - # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataFormat] - # Details for issues related to invalid or unsupported data formats. - # @!attribute [rw] incompatible_data_schema - # @return [::Google::Cloud::Dataplex::V1::Action::IncompatibleDataSchema] - # Details for issues related to incompatible schemas detected within data. - # @!attribute [rw] invalid_data_partition - # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataPartition] - # Details for issues related to invalid or unsupported data partition - # structure. - # @!attribute [rw] missing_data - # @return [::Google::Cloud::Dataplex::V1::Action::MissingData] - # Details for issues related to absence of data within managed resources. - # @!attribute [rw] missing_resource - # @return [::Google::Cloud::Dataplex::V1::Action::MissingResource] - # Details for issues related to absence of a managed resource. - # @!attribute [rw] unauthorized_resource - # @return [::Google::Cloud::Dataplex::V1::Action::UnauthorizedResource] - # Details for issues related to lack of permissions to access data - # resources. - # @!attribute [rw] failed_security_policy_apply - # @return [::Google::Cloud::Dataplex::V1::Action::FailedSecurityPolicyApply] - # Details for issues related to applying security policy. - # @!attribute [rw] invalid_data_organization - # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataOrganization] - # Details for issues related to invalid data arrangement. - class Action - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Action details for resource references in assets that cannot be located. - class MissingResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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. - class UnauthorizedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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. - # @!attribute [rw] asset - # @return [::String] - # Resource name of one of the assets with failing security policy - # application. Populated for a lake or zone resource only. - class FailedSecurityPolicyApply - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Action details for invalid or unsupported data files detected by discovery. - # @!attribute [rw] sampled_data_locations - # @return [::Array<::String>] - # The list of data locations sampled and used for format/schema - # inference. - # @!attribute [rw] expected_format - # @return [::String] - # The expected data format of the entity. - # @!attribute [rw] new_format - # @return [::String] - # The new unexpected data format within the entity. - class InvalidDataFormat - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Action details for incompatible schemas detected by discovery. - # @!attribute [rw] table - # @return [::String] - # The name of the table containing invalid data. - # @!attribute [rw] existing_schema - # @return [::String] - # The existing and expected schema of the table. The schema is provided as - # a JSON formatted structure listing columns and data types. - # @!attribute [rw] new_schema - # @return [::String] - # The new and incompatible schema within the table. The schema is provided - # as a JSON formatted structured listing columns and data types. - # @!attribute [rw] sampled_data_locations - # @return [::Array<::String>] - # The list of data locations sampled and used for format/schema - # inference. - # @!attribute [rw] schema_change - # @return [::Google::Cloud::Dataplex::V1::Action::IncompatibleDataSchema::SchemaChange] - # Whether the action relates to a schema that is incompatible or modified. - class IncompatibleDataSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Whether the action relates to a schema that is incompatible or modified. - module 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 - end - end - - # Action details for invalid or unsupported partitions detected by discovery. - # @!attribute [rw] expected_structure - # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataPartition::PartitionStructure] - # The issue type of InvalidDataPartition. - class InvalidDataPartition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The expected partition structure. - module 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 - end - end - - # Action details for absence of data detected by discovery. - class MissingData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Action details for invalid data arrangement. - class InvalidDataOrganization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The category of issues. - module 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 - end - end - - # An asset represents a cloud resource that is being managed within a lake as a - # member of a zone. - # @!attribute [r] name - # @return [::String] - # 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}`. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the asset was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the asset was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined labels for the asset. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the asset. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the asset. - # @!attribute [rw] resource_spec - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec] - # Required. Specification of the resource that is referenced by this asset. - # @!attribute [r] resource_status - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceStatus] - # Output only. Status of the resource referenced by this asset. - # @!attribute [r] security_status - # @return [::Google::Cloud::Dataplex::V1::Asset::SecurityStatus] - # Output only. Status of the security policy applied to resource referenced - # by this asset. - # @!attribute [rw] discovery_spec - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec] - # 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. - # @!attribute [r] discovery_status - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus] - # Output only. Status of the discovery feature applied to data referenced by - # this asset. - class Asset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Security policy status of the asset. Data security policy, i.e., readers, - # writers & owners, should be specified in the lake/zone/asset IAM policy. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::Asset::SecurityStatus::State] - # The current state of the security policy applied to the attached - # resource. - # @!attribute [rw] message - # @return [::String] - # Additional information about the current state. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the status. - class SecurityStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the security policy. - module 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 - end - end - - # Settings to manage the metadata discovery and publishing for an asset. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. Whether discovery is enabled. - # @!attribute [rw] include_patterns - # @return [::Array<::String>] - # 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. - # @!attribute [rw] exclude_patterns - # @return [::Array<::String>] - # 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. - # @!attribute [rw] csv_options - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec::CsvOptions] - # Optional. Configuration for CSV data. - # @!attribute [rw] json_options - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec::JsonOptions] - # Optional. Configuration for Json data. - # @!attribute [rw] schedule - # @return [::String] - # 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 * * * *`. - class DiscoverySpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describe CSV and similar semi-structured data formats. - # @!attribute [rw] header_rows - # @return [::Integer] - # Optional. The number of rows to interpret as header rows that should be - # skipped when reading data rows. - # @!attribute [rw] delimiter - # @return [::String] - # Optional. The delimiter being used to separate values. This defaults to - # ','. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. The default is UTF-8. - # @!attribute [rw] disable_type_inference - # @return [::Boolean] - # Optional. Whether to disable the inference of data type for CSV data. - # If true, all columns will be registered as strings. - class CsvOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describe JSON data format. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. The default is UTF-8. - # @!attribute [rw] disable_type_inference - # @return [::Boolean] - # 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). - class JsonOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Identifies the cloud resource that is referenced by this asset. - # @!attribute [rw] name - # @return [::String] - # 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}` - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec::Type] - # Required. Immutable. Type of resource. - # @!attribute [rw] read_access_mode - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec::AccessMode] - # Optional. Determines how read permissions are handled for each asset and - # their associated tables. Only available to storage buckets assets. - class ResourceSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of resource. - module Type - # Type not specified. - TYPE_UNSPECIFIED = 0 - - # Cloud Storage bucket. - STORAGE_BUCKET = 1 - - # BigQuery dataset. - BIGQUERY_DATASET = 2 - end - - # Access Mode determines how data stored within the resource is read. This - # is only applicable to storage bucket assets. - module 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 - end - end - - # Status of the resource referenced by an asset. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceStatus::State] - # The current state of the managed resource. - # @!attribute [rw] message - # @return [::String] - # Additional information about the current state. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the status. - # @!attribute [r] managed_access_identity - # @return [::String] - # Output only. Service account associated with the BigQuery Connection. - class ResourceStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of a resource. - module State - # State unspecified. - STATE_UNSPECIFIED = 0 - - # Resource does not have any errors. - READY = 1 - - # Resource has errors. - ERROR = 2 - end - end - - # Status of discovery for an asset. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus::State] - # The current status of the discovery feature. - # @!attribute [rw] message - # @return [::String] - # Additional information about the current state. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the status. - # @!attribute [rw] last_run_time - # @return [::Google::Protobuf::Timestamp] - # The start time of the last discovery run. - # @!attribute [rw] stats - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus::Stats] - # Data Stats of the asset reported by discovery. - # @!attribute [rw] last_run_duration - # @return [::Google::Protobuf::Duration] - # The duration of the last discovery run. - class DiscoveryStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The aggregated data statistics for the asset reported by discovery. - # @!attribute [rw] data_items - # @return [::Integer] - # The count of data items within the referenced resource. - # @!attribute [rw] data_size - # @return [::Integer] - # The number of stored data bytes within the referenced resource. - # @!attribute [rw] tables - # @return [::Integer] - # The count of table entities within the referenced resource. - # @!attribute [rw] filesets - # @return [::Integer] - # The count of fileset entities within the referenced resource. - class Stats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Current state of discovery. - module 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 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # State of a resource. - module 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 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb deleted file mode 100644 index 4a900722e1cc..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # ResourceAccessSpec holds the access control configuration to be enforced - # on the resources, for example, Cloud Storage bucket, BigQuery dataset, - # BigQuery table. - # @!attribute [rw] readers - # @return [::Array<::String>] - # 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. - # @!attribute [rw] writers - # @return [::Array<::String>] - # Optional. The set of principals to be granted writer role on the resource. - # @!attribute [rw] owners - # @return [::Array<::String>] - # Optional. The set of principals to be granted owner role on the resource. - class ResourceAccessSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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. - # @!attribute [rw] readers - # @return [::Array<::String>] - # 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. - class DataAccessSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb deleted file mode 100644 index 00b0c56e0f04..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb +++ /dev/null @@ -1,803 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # Create lake request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] lake_id - # @return [::String] - # 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. - # @!attribute [rw] lake - # @return [::Google::Cloud::Dataplex::V1::Lake] - # Required. Lake resource - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateLakeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update lake request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] lake - # @return [::Google::Cloud::Dataplex::V1::Lake] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateLakeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete lake request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - class DeleteLakeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List lakes request. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListLakesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List lakes response. - # @!attribute [rw] lakes - # @return [::Array<::Google::Cloud::Dataplex::V1::Lake>] - # Lakes under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListLakesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List lake actions request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - class ListLakeActionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List actions response. - # @!attribute [rw] actions - # @return [::Array<::Google::Cloud::Dataplex::V1::Action>] - # Actions under the given parent lake/zone/asset. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListActionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get lake request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - class GetLakeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create zone request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] zone_id - # @return [::String] - # 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") - # @!attribute [rw] zone - # @return [::Google::Cloud::Dataplex::V1::Zone] - # Required. Zone resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update zone request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] zone - # @return [::Google::Cloud::Dataplex::V1::Zone] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete zone request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - class DeleteZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List zones request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListZonesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List zones response. - # @!attribute [rw] zones - # @return [::Array<::Google::Cloud::Dataplex::V1::Zone>] - # Zones under the given parent lake. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListZonesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List zone actions request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - class ListZoneActionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get zone request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - class GetZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create asset request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] asset_id - # @return [::String] - # 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. - # @!attribute [rw] asset - # @return [::Google::Cloud::Dataplex::V1::Asset] - # Required. Asset resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update asset request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] asset - # @return [::Google::Cloud::Dataplex::V1::Asset] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete asset request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - class DeleteAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List assets request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListAssetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List assets response. - # @!attribute [rw] assets - # @return [::Array<::Google::Cloud::Dataplex::V1::Asset>] - # Asset under the given parent zone. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListAssetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List asset actions request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - class ListAssetActionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get asset request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - class GetAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of a long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # 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`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create task request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] task_id - # @return [::String] - # Required. Task identifier. - # @!attribute [rw] task - # @return [::Google::Cloud::Dataplex::V1::Task] - # Required. Task resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update task request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] task - # @return [::Google::Cloud::Dataplex::V1::Task] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete task request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - class DeleteTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List tasks request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List tasks response. - # @!attribute [rw] tasks - # @return [::Array<::Google::Cloud::Dataplex::V1::Task>] - # Tasks under the given parent lake. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get task request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - class GetTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get job request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - class GetJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # 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. - # @!attribute [rw] args - # @return [::Google::Protobuf::Map{::String => ::String}] - # 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. - class RunTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ArgsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] job - # @return [::Google::Cloud::Dataplex::V1::Job] - # Jobs created by RunTask API. - class RunTaskResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List jobs request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - class ListJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List jobs response. - # @!attribute [rw] jobs - # @return [::Array<::Google::Cloud::Dataplex::V1::Job>] - # Jobs under a given task. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListJobsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Cancel task jobs. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - class CancelJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create environment request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] environment_id - # @return [::String] - # 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. - # @!attribute [rw] environment - # @return [::Google::Cloud::Dataplex::V1::Environment] - # Required. Environment resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateEnvironmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update environment request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] environment - # @return [::Google::Cloud::Dataplex::V1::Environment] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateEnvironmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete environment request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the environment: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - class DeleteEnvironmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List environments request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListEnvironmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List environments response. - # @!attribute [rw] environments - # @return [::Array<::Google::Cloud::Dataplex::V1::Environment>] - # Environments under the given parent lake. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListEnvironmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get environment request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the environment: - # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - class GetEnvironmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List sessions request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # 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. - # @!attribute [rw] filter - # @return [::String] - # 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 - class ListSessionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List sessions response. - # @!attribute [rw] sessions - # @return [::Array<::Google::Cloud::Dataplex::V1::Session>] - # Sessions under a given environment. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListSessionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb deleted file mode 100644 index b18b15ea7b54..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb +++ /dev/null @@ -1,435 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Dataplex - module V1 - # A task represents a user-visible job. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the task, of the form: - # projects/\\{project_number}/locations/\\{location_id}/lakes/\\{lake_id}/ - # tasks/\\{task_id}. - # @!attribute [r] uid - # @return [::String] - # 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. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the task was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the task was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the task. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the task. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the task. - # @!attribute [rw] trigger_spec - # @return [::Google::Cloud::Dataplex::V1::Task::TriggerSpec] - # Required. Spec related to how often and when a task should be triggered. - # @!attribute [rw] execution_spec - # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionSpec] - # Required. Spec related to how a task is executed. - # @!attribute [r] execution_status - # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionStatus] - # Output only. Status of the latest task executions. - # @!attribute [rw] spark - # @return [::Google::Cloud::Dataplex::V1::Task::SparkTaskConfig] - # Config related to running custom Spark tasks. - # @!attribute [rw] notebook - # @return [::Google::Cloud::Dataplex::V1::Task::NotebookTaskConfig] - # Config related to running scheduled Notebooks. - class Task - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for the underlying infrastructure used to run workloads. - # @!attribute [rw] batch - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::BatchComputeResources] - # Compute resources needed for a Task when using Dataproc Serverless. - # @!attribute [rw] container_image - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::ContainerImageRuntime] - # Container Image Runtime Configuration. - # @!attribute [rw] vpc_network - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::VpcNetwork] - # Vpc network. - class InfrastructureSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Batch compute resources associated with the task. - # @!attribute [rw] executors_count - # @return [::Integer] - # Optional. Total number of job executors. - # Executor Count should be between 2 and 100. [Default=2] - # @!attribute [rw] max_executors_count - # @return [::Integer] - # 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] - class BatchComputeResources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container Image Runtime Configuration used with Batch execution. - # @!attribute [rw] image - # @return [::String] - # Optional. Container image to use. - # @!attribute [rw] java_jars - # @return [::Array<::String>] - # 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 - # @!attribute [rw] python_packages - # @return [::Array<::String>] - # 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 - # @!attribute [rw] properties - # @return [::Google::Protobuf::Map{::String => ::String}] - # 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). - class ContainerImageRuntime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class PropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Cloud VPC Network used to run the infrastructure. - # @!attribute [rw] network - # @return [::String] - # Optional. The Cloud VPC network in which the job is run. By default, - # the Cloud VPC network named Default within the project is used. - # @!attribute [rw] sub_network - # @return [::String] - # Optional. The Cloud VPC sub-network in which the job is run. - # @!attribute [rw] network_tags - # @return [::Array<::String>] - # Optional. List of network tags to apply to the job. - class VpcNetwork - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Task scheduling and trigger settings. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Task::TriggerSpec::Type] - # Required. Immutable. Trigger type of the user-specified Task. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # 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. - # @!attribute [rw] disabled - # @return [::Boolean] - # Optional. Prevent the task from executing. - # This does not cancel already running tasks. It is intended to temporarily - # disable RECURRING tasks. - # @!attribute [rw] max_retries - # @return [::Integer] - # Optional. Number of retry attempts before aborting. - # Set to zero to never attempt to retry a failed task. - # @!attribute [rw] schedule - # @return [::String] - # 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. - class TriggerSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Determines how often and when the job will run. - module 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 - end - end - - # Execution related settings, like retry and service_account. - # @!attribute [rw] args - # @return [::Google::Protobuf::Map{::String => ::String}] - # 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. - # @!attribute [rw] service_account - # @return [::String] - # Required. Service account to use to execute a task. - # If not provided, the default Compute service account for the project is - # used. - # @!attribute [rw] project - # @return [::String] - # Optional. The project in which jobs are run. By default, the project - # containing the Lake is used. If a project is provided, the - # {::Google::Cloud::Dataplex::V1::Task::ExecutionSpec#service_account ExecutionSpec.service_account} - # must belong to this project. - # @!attribute [rw] max_job_execution_lifetime - # @return [::Google::Protobuf::Duration] - # Optional. The maximum duration after which the job execution is expired. - # @!attribute [rw] kms_key - # @return [::String] - # 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}`. - class ExecutionSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ArgsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # User-specified config for running a Spark task. - # @!attribute [rw] main_jar_file_uri - # @return [::String] - # 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`). - # @!attribute [rw] main_class - # @return [::String] - # 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`). - # @!attribute [rw] python_script_file - # @return [::String] - # 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`). - # @!attribute [rw] sql_script_file - # @return [::String] - # 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";`). - # @!attribute [rw] sql_script - # @return [::String] - # The query text. - # The execution args are used to declare a set of script variables - # (`set key="value";`). - # @!attribute [rw] file_uris - # @return [::Array<::String>] - # Optional. Cloud Storage URIs of files to be placed in the working - # directory of each executor. - # @!attribute [rw] archive_uris - # @return [::Array<::String>] - # 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. - # @!attribute [rw] infrastructure_spec - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec] - # Optional. Infrastructure specification for the execution. - class SparkTaskConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for running scheduled notebooks. - # @!attribute [rw] notebook - # @return [::String] - # 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`). - # @!attribute [rw] infrastructure_spec - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec] - # Optional. Infrastructure specification for the execution. - # @!attribute [rw] file_uris - # @return [::Array<::String>] - # Optional. Cloud Storage URIs of files to be placed in the working - # directory of each executor. - # @!attribute [rw] archive_uris - # @return [::Array<::String>] - # 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. - class NotebookTaskConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of the task execution (e.g. Jobs). - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update time of the status. - # @!attribute [r] latest_job - # @return [::Google::Cloud::Dataplex::V1::Job] - # Output only. latest job execution - class ExecutionStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A job represents an instance of a task. - # @!attribute [r] name - # @return [::String] - # 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}`. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the job. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the job was started. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the job ended. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::Job::State] - # Output only. Execution state for the job. - # @!attribute [r] retry_count - # @return [::Integer] - # Output only. The number of times the job has been retried (excluding the - # initial attempt). - # @!attribute [r] service - # @return [::Google::Cloud::Dataplex::V1::Job::Service] - # Output only. The underlying service running a job. - # @!attribute [r] service_job - # @return [::String] - # Output only. The full resource name for the job run under a particular - # service. - # @!attribute [r] message - # @return [::String] - # Output only. Additional information about the current state. - # @!attribute [r] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. User-defined labels for the task. - # @!attribute [r] trigger - # @return [::Google::Cloud::Dataplex::V1::Job::Trigger] - # Output only. Job execution trigger. - # @!attribute [r] execution_spec - # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionSpec] - # Output only. Spec related to how a task is executed. - class Job - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - module Service - # Service used to run the job is unspecified. - SERVICE_UNSPECIFIED = 0 - - # Dataproc service is used to run this job. - DATAPROC = 1 - end - - module 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 - end - - # Job execution trigger. - module 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 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 54b83fb82b7d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,164 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal response of the operation in case of success. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc LongRunningRecognize(LongRunningRecognizeRequest) - # returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "LongRunningRecognizeResponse" - # metadata_type: "LongRunningRecognizeMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index fb4d6862eac9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index b5731a824060..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 8c6b19d52e3d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 8e7abcf8f052..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 9e96368be9d9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,96 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 4ac9c4801a3f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index 09acc69b6125..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 41c8c3a565cc..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile deleted file mode 100644 index 886d5625e3df..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-dataplex-v1", path: "../" -else - gem "google-cloud-dataplex-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb deleted file mode 100644 index f36fc0933161..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_CreateAspectType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_aspect_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type. -# -def create_aspect_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new - - # Call the create_aspect_type method. - result = client.create_aspect_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_CreateAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb deleted file mode 100644 index 3f4ccb2d81f7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_CreateEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry. -# -def create_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new - - # Call the create_entry method. - result = client.create_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_CreateEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb deleted file mode 100644 index 376349a60218..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_CreateEntryGroup_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_entry_group call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group. -# -def create_entry_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new - - # Call the create_entry_group method. - result = client.create_entry_group request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_CreateEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb deleted file mode 100644 index 314b91f322c9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_CreateEntryType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_entry_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type. -# -def create_entry_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new - - # Call the create_entry_type method. - result = client.create_entry_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_CreateEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb deleted file mode 100644 index 362457b5a4b7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_DeleteAspectType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_aspect_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type. -# -def delete_aspect_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new - - # Call the delete_aspect_type method. - result = client.delete_aspect_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_DeleteAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb deleted file mode 100644 index 3d1fe413c62c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_DeleteEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry. -# -def delete_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new - - # Call the delete_entry method. - result = client.delete_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_DeleteEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb deleted file mode 100644 index 7246b08a556c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_entry_group call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group. -# -def delete_entry_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new - - # Call the delete_entry_group method. - result = client.delete_entry_group request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb deleted file mode 100644 index 794e94fe2f28..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_DeleteEntryType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_entry_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type. -# -def delete_entry_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new - - # Call the delete_entry_type method. - result = client.delete_entry_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_DeleteEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb deleted file mode 100644 index fd04921c117d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_GetAspectType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_aspect_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type. -# -def get_aspect_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new - - # Call the get_aspect_type method. - result = client.get_aspect_type request - - # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. - p result -end -# [END dataplex_v1_generated_CatalogService_GetAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb deleted file mode 100644 index c1abef4d1f90..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_GetEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry. -# -def get_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEntryRequest.new - - # Call the get_entry method. - result = client.get_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_GetEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb deleted file mode 100644 index 6319704f7a07..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_GetEntryGroup_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_entry_group call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group. -# -def get_entry_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new - - # Call the get_entry_group method. - result = client.get_entry_group request - - # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. - p result -end -# [END dataplex_v1_generated_CatalogService_GetEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb deleted file mode 100644 index ffb3842dffa8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_GetEntryType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_entry_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type. -# -def get_entry_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new - - # Call the get_entry_type method. - result = client.get_entry_type request - - # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. - p result -end -# [END dataplex_v1_generated_CatalogService_GetEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb deleted file mode 100644 index 8bd6fc13947e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_ListAspectTypes_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_aspect_types call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types. -# -def list_aspect_types - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new - - # Call the list_aspect_types method. - result = client.list_aspect_types request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. - p item - end -end -# [END dataplex_v1_generated_CatalogService_ListAspectTypes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb deleted file mode 100644 index 831f4b59a1d7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_ListEntries_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_entries call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries. -# -def list_entries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new - - # Call the list_entries method. - result = client.list_entries request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. - p item - end -end -# [END dataplex_v1_generated_CatalogService_ListEntries_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb deleted file mode 100644 index c43311632377..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_ListEntryGroups_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_entry_groups call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups. -# -def list_entry_groups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new - - # Call the list_entry_groups method. - result = client.list_entry_groups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. - p item - end -end -# [END dataplex_v1_generated_CatalogService_ListEntryGroups_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb deleted file mode 100644 index 6864cb0191c1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_ListEntryTypes_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_entry_types call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types. -# -def list_entry_types - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new - - # Call the list_entry_types method. - result = client.list_entry_types request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. - p item - end -end -# [END dataplex_v1_generated_CatalogService_ListEntryTypes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb deleted file mode 100644 index a0eb324209fa..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_LookupEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the lookup_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry. -# -def lookup_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new - - # Call the lookup_entry method. - result = client.lookup_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_LookupEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb deleted file mode 100644 index 0cda02b0b5ae..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_SearchEntries_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the search_entries call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries. -# -def search_entries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new - - # Call the search_entries method. - result = client.search_entries request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. - p item - end -end -# [END dataplex_v1_generated_CatalogService_SearchEntries_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb deleted file mode 100644 index 3bd635f8ae9f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_UpdateAspectType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_aspect_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type. -# -def update_aspect_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new - - # Call the update_aspect_type method. - result = client.update_aspect_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_UpdateAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb deleted file mode 100644 index 38c35bdfb614..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_UpdateEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry. -# -def update_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new - - # Call the update_entry method. - result = client.update_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_UpdateEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb deleted file mode 100644 index 14ebf2748edb..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_entry_group call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group. -# -def update_entry_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new - - # Call the update_entry_group method. - result = client.update_entry_group request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb deleted file mode 100644 index 6e84f438b832..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_CatalogService_UpdateEntryType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_entry_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type. -# -def update_entry_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new - - # Call the update_entry_type method. - result = client.update_entry_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_UpdateEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb deleted file mode 100644 index 9b30f42a41ad..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/create_content.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_CreateContent_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_content call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#create_content. -# -def create_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateContentRequest.new - - # Call the create_content method. - result = client.create_content request - - # The returned object is of type Google::Cloud::Dataplex::V1::Content. - p result -end -# [END dataplex_v1_generated_ContentService_CreateContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb deleted file mode 100644 index 2169aa8d6106..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_DeleteContent_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_content call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#delete_content. -# -def delete_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new - - # Call the delete_content method. - result = client.delete_content request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dataplex_v1_generated_ContentService_DeleteContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb deleted file mode 100644 index 45684231c227..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_content.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_GetContent_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_content call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#get_content. -# -def get_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetContentRequest.new - - # Call the get_content method. - result = client.get_content request - - # The returned object is of type Google::Cloud::Dataplex::V1::Content. - p result -end -# [END dataplex_v1_generated_ContentService_GetContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb deleted file mode 100644 index 1b54efd1b16b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_GetIamPolicy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_iam_policy call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END dataplex_v1_generated_ContentService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb deleted file mode 100644 index 180c52eb5d49..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/list_content.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_ListContent_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_content call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#list_content. -# -def list_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListContentRequest.new - - # Call the list_content method. - result = client.list_content request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Content. - p item - end -end -# [END dataplex_v1_generated_ContentService_ListContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb deleted file mode 100644 index fee701099ea8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_SetIamPolicy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the set_iam_policy call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END dataplex_v1_generated_ContentService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb deleted file mode 100644 index c6b913d91e9d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_TestIamPermissions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the test_iam_permissions call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END dataplex_v1_generated_ContentService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb deleted file mode 100644 index bc5ad4969c2a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/content_service/update_content.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_ContentService_UpdateContent_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_content call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#update_content. -# -def update_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new - - # Call the update_content method. - result = client.update_content request - - # The returned object is of type Google::Cloud::Dataplex::V1::Content. - p result -end -# [END dataplex_v1_generated_ContentService_UpdateContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb deleted file mode 100644 index 7ef5da803df4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_CreateDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan. -# -def create_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new - - # Call the create_data_scan method. - result = client.create_data_scan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataScanService_CreateDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb deleted file mode 100644 index af01e019be16..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_DeleteDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan. -# -def delete_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new - - # Call the delete_data_scan method. - result = client.delete_data_scan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataScanService_DeleteDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb deleted file mode 100644 index eab1de8202ec..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the generate_data_quality_rules call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules. -# -def generate_data_quality_rules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new - - # Call the generate_data_quality_rules method. - result = client.generate_data_quality_rules request - - # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. - p result -end -# [END dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb deleted file mode 100644 index dced954461e9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_GetDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan. -# -def get_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new - - # Call the get_data_scan method. - result = client.get_data_scan request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. - p result -end -# [END dataplex_v1_generated_DataScanService_GetDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb deleted file mode 100644 index 5e2e0112253e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_GetDataScanJob_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_scan_job call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job. -# -def get_data_scan_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new - - # Call the get_data_scan_job method. - result = client.get_data_scan_job request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. - p result -end -# [END dataplex_v1_generated_DataScanService_GetDataScanJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb deleted file mode 100644 index 1c17e1599263..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_ListDataScanJobs_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_scan_jobs call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs. -# -def list_data_scan_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new - - # Call the list_data_scan_jobs method. - result = client.list_data_scan_jobs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. - p item - end -end -# [END dataplex_v1_generated_DataScanService_ListDataScanJobs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb deleted file mode 100644 index 54ffbe334d01..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_ListDataScans_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_scans call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans. -# -def list_data_scans - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new - - # Call the list_data_scans method. - result = client.list_data_scans request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. - p item - end -end -# [END dataplex_v1_generated_DataScanService_ListDataScans_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb deleted file mode 100644 index f55818ed8adc..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_RunDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the run_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan. -# -def run_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new - - # Call the run_data_scan method. - result = client.run_data_scan request - - # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. - p result -end -# [END dataplex_v1_generated_DataScanService_RunDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb deleted file mode 100644 index 7b26badc2ad8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataScanService_UpdateDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan. -# -def update_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new - - # Call the update_data_scan method. - result = client.update_data_scan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataScanService_UpdateDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb deleted file mode 100644 index 62e0e7f23812..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_data_attribute call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute. -# -def create_data_attribute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new - - # Call the create_data_attribute method. - result = client.create_data_attribute request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb deleted file mode 100644 index 5dabda7bd877..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_data_attribute_binding call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding. -# -def create_data_attribute_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new - - # Call the create_data_attribute_binding method. - result = client.create_data_attribute_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb deleted file mode 100644 index b7a056141f7c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_data_taxonomy call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy. -# -def create_data_taxonomy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new - - # Call the create_data_taxonomy method. - result = client.create_data_taxonomy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb deleted file mode 100644 index 4d84a87bda45..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_data_attribute call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute. -# -def delete_data_attribute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new - - # Call the delete_data_attribute method. - result = client.delete_data_attribute request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb deleted file mode 100644 index e970651237e0..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_data_attribute_binding call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding. -# -def delete_data_attribute_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new - - # Call the delete_data_attribute_binding method. - result = client.delete_data_attribute_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb deleted file mode 100644 index 033d8d48c223..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_data_taxonomy call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy. -# -def delete_data_taxonomy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new - - # Call the delete_data_taxonomy method. - result = client.delete_data_taxonomy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb deleted file mode 100644 index abe63f31f367..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_attribute call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute. -# -def get_data_attribute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new - - # Call the get_data_attribute method. - result = client.get_data_attribute request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. - p result -end -# [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb deleted file mode 100644 index 8c7d901dad8f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_attribute_binding call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding. -# -def get_data_attribute_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new - - # Call the get_data_attribute_binding method. - result = client.get_data_attribute_binding request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. - p result -end -# [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb deleted file mode 100644 index 7bf0cd32bd75..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_taxonomy call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy. -# -def get_data_taxonomy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new - - # Call the get_data_taxonomy method. - result = client.get_data_taxonomy request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. - p result -end -# [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb deleted file mode 100644 index fad7c5897a7d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_attribute_bindings call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings. -# -def list_data_attribute_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new - - # Call the list_data_attribute_bindings method. - result = client.list_data_attribute_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. - p item - end -end -# [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb deleted file mode 100644 index 55c9a289ae36..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_attributes call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes. -# -def list_data_attributes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new - - # Call the list_data_attributes method. - result = client.list_data_attributes request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. - p item - end -end -# [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb deleted file mode 100644 index 3e5870ec0258..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_taxonomies call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies. -# -def list_data_taxonomies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new - - # Call the list_data_taxonomies method. - result = client.list_data_taxonomies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. - p item - end -end -# [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb deleted file mode 100644 index ee672d4f9dec..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_data_attribute call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute. -# -def update_data_attribute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new - - # Call the update_data_attribute method. - result = client.update_data_attribute request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb deleted file mode 100644 index a020c8860103..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_data_attribute_binding call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding. -# -def update_data_attribute_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new - - # Call the update_data_attribute_binding method. - result = client.update_data_attribute_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb deleted file mode 100644 index 6985aff5b2c2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_data_taxonomy call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy. -# -def update_data_taxonomy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new - - # Call the update_data_taxonomy method. - result = client.update_data_taxonomy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb deleted file mode 100644 index 476f4f673938..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_CancelJob_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the cancel_job call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job. -# -def cancel_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CancelJobRequest.new - - # Call the cancel_job method. - result = client.cancel_job request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dataplex_v1_generated_DataplexService_CancelJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb deleted file mode 100644 index b830cdb49245..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_CreateAsset_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_asset call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset. -# -def create_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new - - # Call the create_asset method. - result = client.create_asset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb deleted file mode 100644 index cc4ed9ab1745..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_CreateEnvironment_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_environment call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_environment. -# -def create_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new - - # Call the create_environment method. - result = client.create_environment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb deleted file mode 100644 index 89eac2aa7769..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_CreateLake_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_lake call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake. -# -def create_lake - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new - - # Call the create_lake method. - result = client.create_lake request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb deleted file mode 100644 index a0ad46d5e011..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_CreateTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_task. -# -def create_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new - - # Call the create_task method. - result = client.create_task request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb deleted file mode 100644 index 59801ff23b87..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_CreateZone_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_zone call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone. -# -def create_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new - - # Call the create_zone method. - result = client.create_zone request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb deleted file mode 100644 index 1a298cfcc413..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_DeleteAsset_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_asset call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset. -# -def delete_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new - - # Call the delete_asset method. - result = client.delete_asset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb deleted file mode 100644 index 924fdce94a2b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_DeleteEnvironment_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_environment call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_environment. -# -def delete_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new - - # Call the delete_environment method. - result = client.delete_environment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb deleted file mode 100644 index 7e48a9f3bc20..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_DeleteLake_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_lake call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake. -# -def delete_lake - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new - - # Call the delete_lake method. - result = client.delete_lake request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb deleted file mode 100644 index aeaf3570fdda..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_DeleteTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task. -# -def delete_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new - - # Call the delete_task method. - result = client.delete_task request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb deleted file mode 100644 index f091b4f3316e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_DeleteZone_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_zone call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone. -# -def delete_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new - - # Call the delete_zone method. - result = client.delete_zone request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb deleted file mode 100644 index ece27d07087a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_GetAsset_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_asset call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset. -# -def get_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetAssetRequest.new - - # Call the get_asset method. - result = client.get_asset request - - # The returned object is of type Google::Cloud::Dataplex::V1::Asset. - p result -end -# [END dataplex_v1_generated_DataplexService_GetAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb deleted file mode 100644 index 3273a7e0da3a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_GetEnvironment_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_environment call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_environment. -# -def get_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new - - # Call the get_environment method. - result = client.get_environment request - - # The returned object is of type Google::Cloud::Dataplex::V1::Environment. - p result -end -# [END dataplex_v1_generated_DataplexService_GetEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb deleted file mode 100644 index 26f9422acca1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_GetJob_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_job call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_job. -# -def get_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetJobRequest.new - - # Call the get_job method. - result = client.get_job request - - # The returned object is of type Google::Cloud::Dataplex::V1::Job. - p result -end -# [END dataplex_v1_generated_DataplexService_GetJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb deleted file mode 100644 index 68cf80ffd32a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_GetLake_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_lake call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake. -# -def get_lake - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetLakeRequest.new - - # Call the get_lake method. - result = client.get_lake request - - # The returned object is of type Google::Cloud::Dataplex::V1::Lake. - p result -end -# [END dataplex_v1_generated_DataplexService_GetLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb deleted file mode 100644 index b23744f5aba3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_GetTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_task. -# -def get_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetTaskRequest.new - - # Call the get_task method. - result = client.get_task request - - # The returned object is of type Google::Cloud::Dataplex::V1::Task. - p result -end -# [END dataplex_v1_generated_DataplexService_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb deleted file mode 100644 index 5773281a042c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_GetZone_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_zone call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone. -# -def get_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetZoneRequest.new - - # Call the get_zone method. - result = client.get_zone request - - # The returned object is of type Google::Cloud::Dataplex::V1::Zone. - p result -end -# [END dataplex_v1_generated_DataplexService_GetZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb deleted file mode 100644 index 3de45de0692c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListAssetActions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_asset_actions call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions. -# -def list_asset_actions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new - - # Call the list_asset_actions method. - result = client.list_asset_actions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListAssetActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb deleted file mode 100644 index d45ce372dfbe..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListAssets_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_assets call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets. -# -def list_assets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new - - # Call the list_assets method. - result = client.list_assets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb deleted file mode 100644 index e3b8760b21d3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListEnvironments_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_environments call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_environments. -# -def list_environments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new - - # Call the list_environments method. - result = client.list_environments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Environment. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListEnvironments_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb deleted file mode 100644 index 6d71874cd9e5..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListJobs_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_jobs call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs. -# -def list_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListJobsRequest.new - - # Call the list_jobs method. - result = client.list_jobs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Job. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListJobs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb deleted file mode 100644 index 2cbe46f9ec50..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListLakeActions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_lake_actions call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions. -# -def list_lake_actions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new - - # Call the list_lake_actions method. - result = client.list_lake_actions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListLakeActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb deleted file mode 100644 index 32b87c2dd3af..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListLakes_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_lakes call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes. -# -def list_lakes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListLakesRequest.new - - # Call the list_lakes method. - result = client.list_lakes request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListLakes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb deleted file mode 100644 index 04d0ae4da992..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListSessions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_sessions call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_sessions. -# -def list_sessions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new - - # Call the list_sessions method. - result = client.list_sessions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Session. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListSessions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb deleted file mode 100644 index 41affa17810a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListTasks_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_tasks call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks. -# -def list_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListTasksRequest.new - - # Call the list_tasks method. - result = client.list_tasks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Task. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb deleted file mode 100644 index c6ab49811f0e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListZoneActions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_zone_actions call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions. -# -def list_zone_actions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new - - # Call the list_zone_actions method. - result = client.list_zone_actions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListZoneActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb deleted file mode 100644 index aba04972dae0..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_ListZones_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_zones call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones. -# -def list_zones - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListZonesRequest.new - - # Call the list_zones method. - result = client.list_zones request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListZones_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb deleted file mode 100644 index bf51744559b6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_RunTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the run_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#run_task. -# -def run_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::RunTaskRequest.new - - # Call the run_task method. - result = client.run_task request - - # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. - p result -end -# [END dataplex_v1_generated_DataplexService_RunTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb deleted file mode 100644 index 07a02bd339b9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_UpdateAsset_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_asset call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset. -# -def update_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new - - # Call the update_asset method. - result = client.update_asset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb deleted file mode 100644 index bf327a685bca..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_UpdateEnvironment_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_environment call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_environment. -# -def update_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new - - # Call the update_environment method. - result = client.update_environment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb deleted file mode 100644 index d4dda821cac2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_UpdateLake_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_lake call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake. -# -def update_lake - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new - - # Call the update_lake method. - result = client.update_lake request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb deleted file mode 100644 index 3440b1c8c05e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_UpdateTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_task. -# -def update_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new - - # Call the update_task method. - result = client.update_task request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb deleted file mode 100644 index 9ab74438a946..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_DataplexService_UpdateZone_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_zone call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone. -# -def update_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new - - # Call the update_zone method. - result = client.update_zone request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb deleted file mode 100644 index f19b23bf2929..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_CreateEntity_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_entity call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity. -# -def create_entity - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEntityRequest.new - - # Call the create_entity method. - result = client.create_entity request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - p result -end -# [END dataplex_v1_generated_MetadataService_CreateEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb deleted file mode 100644 index 7eaff8ebc340..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_CreatePartition_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_partition call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition. -# -def create_partition - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new - - # Call the create_partition method. - result = client.create_partition request - - # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - p result -end -# [END dataplex_v1_generated_MetadataService_CreatePartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb deleted file mode 100644 index 6269c6757544..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_DeleteEntity_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_entity call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity. -# -def delete_entity - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new - - # Call the delete_entity method. - result = client.delete_entity request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dataplex_v1_generated_MetadataService_DeleteEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb deleted file mode 100644 index 31b484f3720d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_DeletePartition_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_partition call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition. -# -def delete_partition - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new - - # Call the delete_partition method. - result = client.delete_partition request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dataplex_v1_generated_MetadataService_DeletePartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb deleted file mode 100644 index 9d31a3e13b07..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_GetEntity_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_entity call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity. -# -def get_entity - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEntityRequest.new - - # Call the get_entity method. - result = client.get_entity request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - p result -end -# [END dataplex_v1_generated_MetadataService_GetEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb deleted file mode 100644 index 278958c7dba3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_GetPartition_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_partition call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition. -# -def get_partition - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new - - # Call the get_partition method. - result = client.get_partition request - - # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - p result -end -# [END dataplex_v1_generated_MetadataService_GetPartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb deleted file mode 100644 index a584b2b7d4df..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_ListEntities_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_entities call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities. -# -def list_entities - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new - - # Call the list_entities method. - result = client.list_entities request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. - p item - end -end -# [END dataplex_v1_generated_MetadataService_ListEntities_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb deleted file mode 100644 index b956ff846f47..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_ListPartitions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_partitions call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions. -# -def list_partitions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new - - # Call the list_partitions method. - result = client.list_partitions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. - p item - end -end -# [END dataplex_v1_generated_MetadataService_ListPartitions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb deleted file mode 100644 index 78a3c2e43ade..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START dataplex_v1_generated_MetadataService_UpdateEntity_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_entity call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity. -# -def update_entity - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new - - # Call the update_entity method. - result = client.update_entity request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - p result -end -# [END dataplex_v1_generated_MetadataService_UpdateEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json b/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json deleted file mode 100644 index e45d8ca85b2e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json +++ /dev/null @@ -1,3855 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-dataplex-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.dataplex.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "dataplex_v1_generated_DataplexService_CreateLake_sync", - "title": "Snippet for the create_lake call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake.", - "file": "dataplex_service/create_lake.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_lake", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateLakeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CreateLake", - "full_name": "google.cloud.dataplex.v1.DataplexService.CreateLake", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_UpdateLake_sync", - "title": "Snippet for the update_lake call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake.", - "file": "dataplex_service/update_lake.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_lake", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateLakeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "UpdateLake", - "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateLake", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_DeleteLake_sync", - "title": "Snippet for the delete_lake call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake.", - "file": "dataplex_service/delete_lake.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_lake", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteLakeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "DeleteLake", - "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteLake", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListLakes_sync", - "title": "Snippet for the list_lakes call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes.", - "file": "dataplex_service/list_lakes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lakes", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListLakesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListLakesResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListLakes", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListLakes", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetLake_sync", - "title": "Snippet for the get_lake call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake.", - "file": "dataplex_service/get_lake.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lake", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetLakeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Lake", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetLake", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetLake", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListLakeActions_sync", - "title": "Snippet for the list_lake_actions call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions.", - "file": "dataplex_service/list_lake_actions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lake_actions", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListLakeActionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListLakeActions", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_CreateZone_sync", - "title": "Snippet for the create_zone call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone.", - "file": "dataplex_service/create_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_zone", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CreateZone", - "full_name": "google.cloud.dataplex.v1.DataplexService.CreateZone", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_UpdateZone_sync", - "title": "Snippet for the update_zone call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone.", - "file": "dataplex_service/update_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_zone", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "UpdateZone", - "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateZone", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_DeleteZone_sync", - "title": "Snippet for the delete_zone call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone.", - "file": "dataplex_service/delete_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_zone", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "DeleteZone", - "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteZone", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListZones_sync", - "title": "Snippet for the list_zones call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones.", - "file": "dataplex_service/list_zones.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_zones", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListZonesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListZonesResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListZones", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListZones", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetZone_sync", - "title": "Snippet for the get_zone call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone.", - "file": "dataplex_service/get_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_zone", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Zone", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetZone", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetZone", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListZoneActions_sync", - "title": "Snippet for the list_zone_actions call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions.", - "file": "dataplex_service/list_zone_actions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_zone_actions", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListZoneActionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListZoneActions", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_CreateAsset_sync", - "title": "Snippet for the create_asset call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset.", - "file": "dataplex_service/create_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_asset", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CreateAsset", - "full_name": "google.cloud.dataplex.v1.DataplexService.CreateAsset", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_UpdateAsset_sync", - "title": "Snippet for the update_asset call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset.", - "file": "dataplex_service/update_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_asset", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "UpdateAsset", - "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_DeleteAsset_sync", - "title": "Snippet for the delete_asset call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset.", - "file": "dataplex_service/delete_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_asset", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "DeleteAsset", - "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListAssets_sync", - "title": "Snippet for the list_assets call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets.", - "file": "dataplex_service/list_assets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_assets", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListAssetsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListAssets", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListAssets", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetAsset_sync", - "title": "Snippet for the get_asset call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset.", - "file": "dataplex_service/get_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_asset", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Asset", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetAsset", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetAsset", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListAssetActions_sync", - "title": "Snippet for the list_asset_actions call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions.", - "file": "dataplex_service/list_asset_actions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_asset_actions", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListAssetActionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListAssetActions", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_CreateTask_sync", - "title": "Snippet for the create_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_task.", - "file": "dataplex_service/create_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CreateTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.CreateTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_UpdateTask_sync", - "title": "Snippet for the update_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_task.", - "file": "dataplex_service/update_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "UpdateTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_DeleteTask_sync", - "title": "Snippet for the delete_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task.", - "file": "dataplex_service/delete_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "DeleteTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListTasks_sync", - "title": "Snippet for the list_tasks call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks.", - "file": "dataplex_service/list_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tasks", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListTasksResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListTasks", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListTasks", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetTask_sync", - "title": "Snippet for the get_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_task.", - "file": "dataplex_service/get_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Task", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListJobs_sync", - "title": "Snippet for the list_jobs call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs.", - "file": "dataplex_service/list_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_jobs", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListJobsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListJobs", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListJobs", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_RunTask_sync", - "title": "Snippet for the run_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#run_task.", - "file": "dataplex_service/run_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#run_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::RunTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::RunTaskResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "RunTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.RunTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetJob_sync", - "title": "Snippet for the get_job call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_job.", - "file": "dataplex_service/get_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_job", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Job", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetJob", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetJob", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_CancelJob_sync", - "title": "Snippet for the cancel_job call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job.", - "file": "dataplex_service/cancel_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "cancel_job", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CancelJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CancelJob", - "full_name": "google.cloud.dataplex.v1.DataplexService.CancelJob", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_CreateEnvironment_sync", - "title": "Snippet for the create_environment call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_environment.", - "file": "dataplex_service/create_environment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_environment", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_environment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CreateEnvironment", - "full_name": "google.cloud.dataplex.v1.DataplexService.CreateEnvironment", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_UpdateEnvironment_sync", - "title": "Snippet for the update_environment call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_environment.", - "file": "dataplex_service/update_environment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_environment", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_environment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "UpdateEnvironment", - "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateEnvironment", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_DeleteEnvironment_sync", - "title": "Snippet for the delete_environment call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_environment.", - "file": "dataplex_service/delete_environment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_environment", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_environment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "DeleteEnvironment", - "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteEnvironment", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListEnvironments_sync", - "title": "Snippet for the list_environments call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_environments.", - "file": "dataplex_service/list_environments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_environments", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_environments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListEnvironments", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListEnvironments", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetEnvironment_sync", - "title": "Snippet for the get_environment call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_environment.", - "file": "dataplex_service/get_environment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_environment", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_environment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEnvironmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Environment", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetEnvironment", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetEnvironment", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListSessions_sync", - "title": "Snippet for the list_sessions call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_sessions.", - "file": "dataplex_service/list_sessions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sessions", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_sessions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListSessionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListSessionsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListSessions", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListSessions", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_CreateEntryType_sync", - "title": "Snippet for the create_entry_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type.", - "file": "catalog_service/create_entry_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_entry_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "CreateEntryType", - "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntryType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntryType_sync", - "title": "Snippet for the update_entry_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type.", - "file": "catalog_service/update_entry_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_entry_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "UpdateEntryType", - "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntryType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntryType_sync", - "title": "Snippet for the delete_entry_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type.", - "file": "catalog_service/delete_entry_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_entry_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "DeleteEntryType", - "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntryType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_ListEntryTypes_sync", - "title": "Snippet for the list_entry_types call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types.", - "file": "catalog_service/list_entry_types.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_entry_types", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEntryTypesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEntryTypesResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "ListEntryTypes", - "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntryTypes", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_GetEntryType_sync", - "title": "Snippet for the get_entry_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type.", - "file": "catalog_service/get_entry_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_entry_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEntryTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::EntryType", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "GetEntryType", - "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntryType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_CreateAspectType_sync", - "title": "Snippet for the create_aspect_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type.", - "file": "catalog_service/create_aspect_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_aspect_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "CreateAspectType", - "full_name": "google.cloud.dataplex.v1.CatalogService.CreateAspectType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_UpdateAspectType_sync", - "title": "Snippet for the update_aspect_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type.", - "file": "catalog_service/update_aspect_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_aspect_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "UpdateAspectType", - "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateAspectType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_DeleteAspectType_sync", - "title": "Snippet for the delete_aspect_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type.", - "file": "catalog_service/delete_aspect_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_aspect_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "DeleteAspectType", - "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteAspectType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_ListAspectTypes_sync", - "title": "Snippet for the list_aspect_types call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types.", - "file": "catalog_service/list_aspect_types.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_aspect_types", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListAspectTypesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListAspectTypesResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "ListAspectTypes", - "full_name": "google.cloud.dataplex.v1.CatalogService.ListAspectTypes", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_GetAspectType_sync", - "title": "Snippet for the get_aspect_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type.", - "file": "catalog_service/get_aspect_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_aspect_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetAspectTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::AspectType", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "GetAspectType", - "full_name": "google.cloud.dataplex.v1.CatalogService.GetAspectType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_CreateEntryGroup_sync", - "title": "Snippet for the create_entry_group call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group.", - "file": "catalog_service/create_entry_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_entry_group", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "CreateEntryGroup", - "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntryGroup", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync", - "title": "Snippet for the update_entry_group call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group.", - "file": "catalog_service/update_entry_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_entry_group", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "UpdateEntryGroup", - "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntryGroup", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync", - "title": "Snippet for the delete_entry_group call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group.", - "file": "catalog_service/delete_entry_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_entry_group", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "DeleteEntryGroup", - "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntryGroup", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_ListEntryGroups_sync", - "title": "Snippet for the list_entry_groups call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups.", - "file": "catalog_service/list_entry_groups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_entry_groups", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "ListEntryGroups", - "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntryGroups", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_GetEntryGroup_sync", - "title": "Snippet for the get_entry_group call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group.", - "file": "catalog_service/get_entry_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_entry_group", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEntryGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::EntryGroup", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "GetEntryGroup", - "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntryGroup", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_CreateEntry_sync", - "title": "Snippet for the create_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry.", - "file": "catalog_service/create_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "CreateEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntry_sync", - "title": "Snippet for the update_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry.", - "file": "catalog_service/update_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "UpdateEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntry_sync", - "title": "Snippet for the delete_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry.", - "file": "catalog_service/delete_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "DeleteEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_ListEntries_sync", - "title": "Snippet for the list_entries call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries.", - "file": "catalog_service/list_entries.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_entries", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEntriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEntriesResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "ListEntries", - "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntries", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_GetEntry_sync", - "title": "Snippet for the get_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry.", - "file": "catalog_service/get_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "GetEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_LookupEntry_sync", - "title": "Snippet for the lookup_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry.", - "file": "catalog_service/lookup_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "lookup_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::LookupEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "LookupEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.LookupEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_SearchEntries_sync", - "title": "Snippet for the search_entries call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries.", - "file": "catalog_service/search_entries.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_entries", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::SearchEntriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::SearchEntriesResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "SearchEntries", - "full_name": "google.cloud.dataplex.v1.CatalogService.SearchEntries", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_CreateContent_sync", - "title": "Snippet for the create_content call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#create_content.", - "file": "content_service/create_content.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#create_content", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateContentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Content", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "CreateContent", - "full_name": "google.cloud.dataplex.v1.ContentService.CreateContent", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_UpdateContent_sync", - "title": "Snippet for the update_content call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#update_content.", - "file": "content_service/update_content.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#update_content", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateContentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Content", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "UpdateContent", - "full_name": "google.cloud.dataplex.v1.ContentService.UpdateContent", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_DeleteContent_sync", - "title": "Snippet for the delete_content call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#delete_content.", - "file": "content_service/delete_content.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#delete_content", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteContentRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "DeleteContent", - "full_name": "google.cloud.dataplex.v1.ContentService.DeleteContent", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_GetContent_sync", - "title": "Snippet for the get_content call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#get_content.", - "file": "content_service/get_content.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#get_content", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetContentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Content", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "GetContent", - "full_name": "google.cloud.dataplex.v1.ContentService.GetContent", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#get_iam_policy.", - "file": "content_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.dataplex.v1.ContentService.GetIamPolicy", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#set_iam_policy.", - "file": "content_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.dataplex.v1.ContentService.SetIamPolicy", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#test_iam_permissions.", - "file": "content_service/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.dataplex.v1.ContentService.TestIamPermissions", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_ContentService_ListContent_sync", - "title": "Snippet for the list_content call in the ContentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::ContentService::Client#list_content.", - "file": "content_service/list_content.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#list_content", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListContentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListContentResponse", - "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" - }, - "method": { - "short_name": "ListContent", - "full_name": "google.cloud.dataplex.v1.ContentService.ListContent", - "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync", - "title": "Snippet for the create_data_taxonomy call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy.", - "file": "data_taxonomy_service/create_data_taxonomy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_taxonomy", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "CreateDataTaxonomy", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataTaxonomy", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync", - "title": "Snippet for the update_data_taxonomy call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy.", - "file": "data_taxonomy_service/update_data_taxonomy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_taxonomy", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "UpdateDataTaxonomy", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataTaxonomy", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync", - "title": "Snippet for the delete_data_taxonomy call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy.", - "file": "data_taxonomy_service/delete_data_taxonomy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_taxonomy", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "DeleteDataTaxonomy", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataTaxonomy", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync", - "title": "Snippet for the list_data_taxonomies call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies.", - "file": "data_taxonomy_service/list_data_taxonomies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_taxonomies", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "ListDataTaxonomies", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataTaxonomies", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync", - "title": "Snippet for the get_data_taxonomy call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy.", - "file": "data_taxonomy_service/get_data_taxonomy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_taxonomy", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataTaxonomy", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "GetDataTaxonomy", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataTaxonomy", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync", - "title": "Snippet for the create_data_attribute_binding call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding.", - "file": "data_taxonomy_service/create_data_attribute_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_attribute_binding", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "CreateDataAttributeBinding", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeBinding", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync", - "title": "Snippet for the update_data_attribute_binding call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding.", - "file": "data_taxonomy_service/update_data_attribute_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_attribute_binding", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "UpdateDataAttributeBinding", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeBinding", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync", - "title": "Snippet for the delete_data_attribute_binding call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding.", - "file": "data_taxonomy_service/delete_data_attribute_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_attribute_binding", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "DeleteDataAttributeBinding", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeBinding", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync", - "title": "Snippet for the list_data_attribute_bindings call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings.", - "file": "data_taxonomy_service/list_data_attribute_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_attribute_bindings", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "ListDataAttributeBindings", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributeBindings", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync", - "title": "Snippet for the get_data_attribute_binding call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding.", - "file": "data_taxonomy_service/get_data_attribute_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_attribute_binding", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataAttributeBinding", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "GetDataAttributeBinding", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeBinding", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync", - "title": "Snippet for the create_data_attribute call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute.", - "file": "data_taxonomy_service/create_data_attribute.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_attribute", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "CreateDataAttribute", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttribute", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync", - "title": "Snippet for the update_data_attribute call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute.", - "file": "data_taxonomy_service/update_data_attribute.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_attribute", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "UpdateDataAttribute", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttribute", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync", - "title": "Snippet for the delete_data_attribute call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute.", - "file": "data_taxonomy_service/delete_data_attribute.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_attribute", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "DeleteDataAttribute", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttribute", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync", - "title": "Snippet for the list_data_attributes call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes.", - "file": "data_taxonomy_service/list_data_attributes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_attributes", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataAttributesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataAttributesResponse", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "ListDataAttributes", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributes", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync", - "title": "Snippet for the get_data_attribute call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute.", - "file": "data_taxonomy_service/get_data_attribute.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_attribute", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataAttributeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataAttribute", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "GetDataAttribute", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttribute", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_CreateDataScan_sync", - "title": "Snippet for the create_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan.", - "file": "data_scan_service/create_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "CreateDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.CreateDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_UpdateDataScan_sync", - "title": "Snippet for the update_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan.", - "file": "data_scan_service/update_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "UpdateDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.UpdateDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_DeleteDataScan_sync", - "title": "Snippet for the delete_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan.", - "file": "data_scan_service/delete_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "DeleteDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.DeleteDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_GetDataScan_sync", - "title": "Snippet for the get_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan.", - "file": "data_scan_service/get_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataScan", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "GetDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.GetDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_ListDataScans_sync", - "title": "Snippet for the list_data_scans call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans.", - "file": "data_scan_service/list_data_scans.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_scans", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataScansRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataScansResponse", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "ListDataScans", - "full_name": "google.cloud.dataplex.v1.DataScanService.ListDataScans", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_RunDataScan_sync", - "title": "Snippet for the run_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan.", - "file": "data_scan_service/run_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::RunDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::RunDataScanResponse", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "RunDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.RunDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_GetDataScanJob_sync", - "title": "Snippet for the get_data_scan_job call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job.", - "file": "data_scan_service/get_data_scan_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_scan_job", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataScanJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataScanJob", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "GetDataScanJob", - "full_name": "google.cloud.dataplex.v1.DataScanService.GetDataScanJob", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_ListDataScanJobs_sync", - "title": "Snippet for the list_data_scan_jobs call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs.", - "file": "data_scan_service/list_data_scan_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_scan_jobs", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "ListDataScanJobs", - "full_name": "google.cloud.dataplex.v1.DataScanService.ListDataScanJobs", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync", - "title": "Snippet for the generate_data_quality_rules call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules.", - "file": "data_scan_service/generate_data_quality_rules.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_data_quality_rules", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "GenerateDataQualityRules", - "full_name": "google.cloud.dataplex.v1.DataScanService.GenerateDataQualityRules", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_CreateEntity_sync", - "title": "Snippet for the create_entity call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity.", - "file": "metadata_service/create_entity.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_entity", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEntityRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entity", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "CreateEntity", - "full_name": "google.cloud.dataplex.v1.MetadataService.CreateEntity", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_UpdateEntity_sync", - "title": "Snippet for the update_entity call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity.", - "file": "metadata_service/update_entity.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_entity", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEntityRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entity", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "UpdateEntity", - "full_name": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_DeleteEntity_sync", - "title": "Snippet for the delete_entity call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity.", - "file": "metadata_service/delete_entity.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_entity", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEntityRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "DeleteEntity", - "full_name": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_GetEntity_sync", - "title": "Snippet for the get_entity call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity.", - "file": "metadata_service/get_entity.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_entity", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEntityRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entity", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "GetEntity", - "full_name": "google.cloud.dataplex.v1.MetadataService.GetEntity", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_ListEntities_sync", - "title": "Snippet for the list_entities call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities.", - "file": "metadata_service/list_entities.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_entities", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEntitiesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEntitiesResponse", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "ListEntities", - "full_name": "google.cloud.dataplex.v1.MetadataService.ListEntities", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_CreatePartition_sync", - "title": "Snippet for the create_partition call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition.", - "file": "metadata_service/create_partition.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_partition", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreatePartitionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Partition", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "CreatePartition", - "full_name": "google.cloud.dataplex.v1.MetadataService.CreatePartition", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_DeletePartition_sync", - "title": "Snippet for the delete_partition call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition.", - "file": "metadata_service/delete_partition.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_partition", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeletePartitionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "DeletePartition", - "full_name": "google.cloud.dataplex.v1.MetadataService.DeletePartition", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_GetPartition_sync", - "title": "Snippet for the get_partition call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition.", - "file": "metadata_service/get_partition.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_partition", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetPartitionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Partition", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "GetPartition", - "full_name": "google.cloud.dataplex.v1.MetadataService.GetPartition", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_ListPartitions_sync", - "title": "Snippet for the list_partitions call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions.", - "file": "metadata_service/list_partitions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_partitions", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListPartitionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListPartitionsResponse", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "ListPartitions", - "full_name": "google.cloud.dataplex.v1.MetadataService.ListPartitions", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb deleted file mode 100644 index d65a7794ef93..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb +++ /dev/null @@ -1,389 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/catalog_pb" -require "google/cloud/dataplex/v1/catalog_services_pb" -require "google/cloud/dataplex/v1/catalog_service" - -class ::Google::Cloud::Dataplex::V1::CatalogService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb deleted file mode 100644 index c1f09a9564e2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb +++ /dev/null @@ -1,95 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/catalog_service" - -class ::Google::Cloud::Dataplex::V1::CatalogService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_aspect_type_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.aspect_type_path project: "value0", location: "value1", aspect_type: "value2" - assert_equal "projects/value0/locations/value1/aspectTypes/value2", path - end - end - - def test_entry_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entry_path project: "value0", location: "value1", entry_group: "value2", entry: "value3" - assert_equal "projects/value0/locations/value1/entryGroups/value2/entries/value3", path - end - end - - def test_entry_group_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entry_group_path project: "value0", location: "value1", entry_group: "value2" - assert_equal "projects/value0/locations/value1/entryGroups/value2", path - end - end - - def test_entry_type_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entry_type_path project: "value0", location: "value1", entry_type: "value2" - assert_equal "projects/value0/locations/value1/entryTypes/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb deleted file mode 100644 index 9d3d20667729..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb +++ /dev/null @@ -1,1330 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/dataplex/v1/catalog_pb" -require "google/cloud/dataplex/v1/catalog_service/rest" - - -class ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_entry_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_type_id = "hello world" - entry_type = {} - validate_only = true - - create_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_entry_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_entry_type parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_entry_type ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_entry_type(::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_entry_type_client_stub.call_count - end - end - end - - def test_update_entry_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - entry_type = {} - update_mask = {} - validate_only = true - - update_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_entry_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_entry_type entry_type: entry_type, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_entry_type ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_entry_type(::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_entry_type_client_stub.call_count - end - end - end - - def test_delete_entry_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_entry_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_entry_type({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_entry_type name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_entry_type ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_entry_type({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_entry_type(::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_entry_type_client_stub.call_count - end - end - end - - def test_list_entry_types - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_entry_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_entry_types_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_entry_types_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_entry_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_entry_types ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_entry_types(::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_entry_types_client_stub.call_count - end - end - end - - def test_get_entry_type - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::EntryType.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_entry_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_entry_type({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_entry_type name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_entry_type ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_entry_type({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_entry_type(::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_entry_type_client_stub.call_count - end - end - end - - def test_create_aspect_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - aspect_type_id = "hello world" - aspect_type = {} - validate_only = true - - create_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_aspect_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_aspect_type parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_aspect_type ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_aspect_type(::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_aspect_type_client_stub.call_count - end - end - end - - def test_update_aspect_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - aspect_type = {} - update_mask = {} - validate_only = true - - update_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_aspect_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_aspect_type aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_aspect_type ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_aspect_type(::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_aspect_type_client_stub.call_count - end - end - end - - def test_delete_aspect_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_aspect_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_aspect_type({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_aspect_type name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_aspect_type ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_aspect_type({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_aspect_type(::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_aspect_type_client_stub.call_count - end - end - end - - def test_list_aspect_types - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_aspect_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_aspect_types_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_aspect_types_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_aspect_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_aspect_types ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_aspect_types(::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_aspect_types_client_stub.call_count - end - end - end - - def test_get_aspect_type - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::AspectType.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_aspect_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_aspect_type({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_aspect_type name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_aspect_type ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_aspect_type({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_aspect_type(::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_aspect_type_client_stub.call_count - end - end - end - - def test_create_entry_group - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_group_id = "hello world" - entry_group = {} - validate_only = true - - create_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_entry_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_entry_group parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_entry_group ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_entry_group(::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_entry_group_client_stub.call_count - end - end - end - - def test_update_entry_group - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - entry_group = {} - update_mask = {} - validate_only = true - - update_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_entry_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_entry_group entry_group: entry_group, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_entry_group ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_entry_group(::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_entry_group_client_stub.call_count - end - end - end - - def test_delete_entry_group - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_entry_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_entry_group({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_entry_group name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_entry_group ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_entry_group({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_entry_group(::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_entry_group_client_stub.call_count - end - end - end - - def test_list_entry_groups - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_entry_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_entry_groups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_entry_groups_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_entry_groups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_entry_groups ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_entry_groups(::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_entry_groups_client_stub.call_count - end - end - end - - def test_get_entry_group - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::EntryGroup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_entry_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_entry_group({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_entry_group name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_entry_group ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_entry_group({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_entry_group(::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_entry_group_client_stub.call_count - end - end - end - - def test_create_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_id = "hello world" - entry = {} - - create_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_create_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_entry parent: parent, entry_id: entry_id, entry: entry do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_entry ::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_entry(::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_entry_client_stub.call_count - end - end - end - - def test_update_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - entry = {} - update_mask = {} - allow_missing = true - delete_missing_aspects = true - aspect_keys = ["hello world"] - - update_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_update_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_entry entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_entry ::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_entry(::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_entry_client_stub.call_count - end - end - end - - def test_delete_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_delete_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_entry({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_entry name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_entry ::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_entry({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_entry(::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_entry_client_stub.call_count - end - end - end - - def test_list_entries - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_entries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_list_entries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_entries_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_entries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_entries ::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_entries(::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_entries_client_stub.call_count - end - end - end - - def test_get_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTRY_VIEW_UNSPECIFIED - aspect_types = ["hello world"] - paths = ["hello world"] - - get_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_get_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_entry name: name, view: view, aspect_types: aspect_types, paths: paths do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_entry ::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_entry(::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_entry_client_stub.call_count - end - end - end - - def test_lookup_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTRY_VIEW_UNSPECIFIED - aspect_types = ["hello world"] - paths = ["hello world"] - entry = "hello world" - - lookup_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_lookup_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, lookup_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.lookup_entry name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.lookup_entry ::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.lookup_entry(::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, lookup_entry_client_stub.call_count - end - end - end - - def test_search_entries - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - scope = "hello world" - - search_entries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.stub :transcode_search_entries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_entries_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_entries_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb deleted file mode 100644 index 9d74d6473f35..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb +++ /dev/null @@ -1,1538 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/catalog_pb" -require "google/cloud/dataplex/v1/catalog_services_pb" -require "google/cloud/dataplex/v1/catalog_service" - -class ::Google::Cloud::Dataplex::V1::CatalogService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_entry_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_type_id = "hello world" - entry_type = {} - validate_only = true - - create_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_entry_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["entry_type_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryType), request["entry_type"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_entry_type parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_entry_type ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_entry_type(::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_entry_type_client_stub.call_rpc_count - end - end - - def test_update_entry_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - entry_type = {} - update_mask = {} - validate_only = true - - update_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_entry_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryType), request["entry_type"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_entry_type entry_type: entry_type, update_mask: update_mask, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_entry_type ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_entry_type(::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_entry_type_client_stub.call_rpc_count - end - end - - def test_delete_entry_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_entry_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_entry_type({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_entry_type name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_entry_type ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_entry_type({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_entry_type(::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_entry_type_client_stub.call_rpc_count - end - end - - def test_list_entry_types - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_entry_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_entry_types, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_entry_types_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_entry_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_entry_types ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_entry_types(::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_entry_types_client_stub.call_rpc_count - end - end - - def test_get_entry_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::EntryType.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_entry_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_entry_type({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_entry_type name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_entry_type ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_entry_type({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_entry_type(::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_entry_type_client_stub.call_rpc_count - end - end - - def test_create_aspect_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - aspect_type_id = "hello world" - aspect_type = {} - validate_only = true - - create_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_aspect_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["aspect_type_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::AspectType), request["aspect_type"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_aspect_type parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_aspect_type ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_aspect_type(::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_aspect_type_client_stub.call_rpc_count - end - end - - def test_update_aspect_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - aspect_type = {} - update_mask = {} - validate_only = true - - update_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_aspect_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::AspectType), request["aspect_type"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_aspect_type aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_aspect_type ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_aspect_type(::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_aspect_type_client_stub.call_rpc_count - end - end - - def test_delete_aspect_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_aspect_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_aspect_type({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_aspect_type name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_aspect_type ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_aspect_type({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_aspect_type(::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_aspect_type_client_stub.call_rpc_count - end - end - - def test_list_aspect_types - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_aspect_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_aspect_types, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_aspect_types_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_aspect_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_aspect_types ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_aspect_types(::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_aspect_types_client_stub.call_rpc_count - end - end - - def test_get_aspect_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::AspectType.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_aspect_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_aspect_type({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_aspect_type name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_aspect_type ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_aspect_type({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_aspect_type(::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_aspect_type_client_stub.call_rpc_count - end - end - - def test_create_entry_group - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_group_id = "hello world" - entry_group = {} - validate_only = true - - create_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_entry_group, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["entry_group_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryGroup), request["entry_group"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_entry_group parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_entry_group ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_entry_group(::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_entry_group_client_stub.call_rpc_count - end - end - - def test_update_entry_group - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - entry_group = {} - update_mask = {} - validate_only = true - - update_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_entry_group, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryGroup), request["entry_group"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_entry_group entry_group: entry_group, update_mask: update_mask, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_entry_group ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_entry_group(::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_entry_group_client_stub.call_rpc_count - end - end - - def test_delete_entry_group - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_entry_group, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_entry_group({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_entry_group name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_entry_group ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_entry_group({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_entry_group(::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_entry_group_client_stub.call_rpc_count - end - end - - def test_list_entry_groups - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_entry_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_entry_groups, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_entry_groups_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_entry_groups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_entry_groups ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_entry_groups(::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_entry_groups_client_stub.call_rpc_count - end - end - - def test_get_entry_group - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::EntryGroup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_entry_group, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_entry_group({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_entry_group name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_entry_group ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_entry_group({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_entry_group(::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_entry_group_client_stub.call_rpc_count - end - end - - def test_create_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_id = "hello world" - entry = {} - - create_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["entry_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entry), request["entry"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_entry parent: parent, entry_id: entry_id, entry: entry do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_entry ::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_entry(::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_entry_client_stub.call_rpc_count - end - end - - def test_update_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - entry = {} - update_mask = {} - allow_missing = true - delete_missing_aspects = true - aspect_keys = ["hello world"] - - update_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entry), request["entry"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - assert_equal true, request["delete_missing_aspects"] - assert_equal ["hello world"], request["aspect_keys"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_entry entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_entry ::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_entry(::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_entry_client_stub.call_rpc_count - end - end - - def test_delete_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_entry({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_entry name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_entry ::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_entry({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_entry(::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_entry_client_stub.call_rpc_count - end - end - - def test_list_entries - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_entries, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntriesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_entries_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_entries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_entries ::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_entries(::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_entries_client_stub.call_rpc_count - end - end - - def test_get_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTRY_VIEW_UNSPECIFIED - aspect_types = ["hello world"] - paths = ["hello world"] - - get_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryRequest, request - assert_equal "hello world", request["name"] - assert_equal :ENTRY_VIEW_UNSPECIFIED, request["view"] - assert_equal ["hello world"], request["aspect_types"] - assert_equal ["hello world"], request["paths"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_entry name: name, view: view, aspect_types: aspect_types, paths: paths do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_entry ::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_entry(::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_entry_client_stub.call_rpc_count - end - end - - def test_lookup_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTRY_VIEW_UNSPECIFIED - aspect_types = ["hello world"] - paths = ["hello world"] - entry = "hello world" - - lookup_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :lookup_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::LookupEntryRequest, request - assert_equal "hello world", request["name"] - assert_equal :ENTRY_VIEW_UNSPECIFIED, request["view"] - assert_equal ["hello world"], request["aspect_types"] - assert_equal ["hello world"], request["paths"] - assert_equal "hello world", request["entry"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, lookup_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.lookup_entry name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.lookup_entry ::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.lookup_entry(::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, lookup_entry_client_stub.call_rpc_count - end - end - - def test_search_entries - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - scope = "hello world" - - search_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_entries, name - assert_kind_of ::Google::Cloud::Dataplex::V1::SearchEntriesRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["query"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["scope"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_entries_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_entries_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration, config - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb deleted file mode 100644 index c2ea8c62284f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/content_service" - -class ::Google::Cloud::Dataplex::V1::ContentService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_content_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.content_path project: "value0", location: "value1", lake: "value2", content: "value3" - assert_equal "projects/value0/locations/value1/lakes/value2/content/value3", path - end - end - - def test_lake_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lake_path project: "value0", location: "value1", lake: "value2" - assert_equal "projects/value0/locations/value1/lakes/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb deleted file mode 100644 index a0e45dc95ec6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb +++ /dev/null @@ -1,535 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/dataplex/v1/content_pb" -require "google/cloud/dataplex/v1/content_service/rest" - - -class ::Google::Cloud::Dataplex::V1::ContentService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_content - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Content.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - content = {} - validate_only = true - - create_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_create_content_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_content({ parent: parent, content: content, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_content parent: parent, content: content, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_content ::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_content({ parent: parent, content: content, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_content(::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_content_client_stub.call_count - end - end - end - - def test_update_content - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Content.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - content = {} - validate_only = true - - update_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_update_content_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_content update_mask: update_mask, content: content, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_content ::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_content(::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_content_client_stub.call_count - end - end - end - - def test_delete_content - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_delete_content_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_content({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_content name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_content ::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_content({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_content(::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_content_client_stub.call_count - end - end - end - - def test_get_content - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Content.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :CONTENT_VIEW_UNSPECIFIED - - get_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_get_content_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_content({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_content name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_content ::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_content({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_content(::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_content_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_list_content - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListContentResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_content_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.stub :transcode_list_content_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_content parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_content ::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_content(::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_content_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb deleted file mode 100644 index 4d1b449973dd..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb +++ /dev/null @@ -1,569 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/content_pb" -require "google/cloud/dataplex/v1/content_services_pb" -require "google/cloud/dataplex/v1/content_service" - -class ::Google::Cloud::Dataplex::V1::ContentService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_content - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Content.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - content = {} - validate_only = true - - create_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_content, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateContentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Content), request["content"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_content({ parent: parent, content: content, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_content parent: parent, content: content, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_content ::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_content({ parent: parent, content: content, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_content(::Google::Cloud::Dataplex::V1::CreateContentRequest.new(parent: parent, content: content, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_content_client_stub.call_rpc_count - end - end - - def test_update_content - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Content.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - content = {} - validate_only = true - - update_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_content, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateContentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Content), request["content"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_content update_mask: update_mask, content: content, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_content ::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_content({ update_mask: update_mask, content: content, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_content(::Google::Cloud::Dataplex::V1::UpdateContentRequest.new(update_mask: update_mask, content: content, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_content_client_stub.call_rpc_count - end - end - - def test_delete_content - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_content, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteContentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_content({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_content name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_content ::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_content({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_content(::Google::Cloud::Dataplex::V1::DeleteContentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_content_client_stub.call_rpc_count - end - end - - def test_get_content - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Content.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :CONTENT_VIEW_UNSPECIFIED - - get_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_content, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetContentRequest, request - assert_equal "hello world", request["name"] - assert_equal :CONTENT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_content({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_content name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_content ::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_content({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_content(::Google::Cloud::Dataplex::V1::GetContentRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_content_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_list_content - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListContentResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_content_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_content, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListContentRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_content_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_content parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_content ::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_content({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_content(::Google::Cloud::Dataplex::V1::ListContentRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_content_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb deleted file mode 100644 index fe360935dd72..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb +++ /dev/null @@ -1,389 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/datascans_pb" -require "google/cloud/dataplex/v1/datascans_services_pb" -require "google/cloud/dataplex/v1/data_scan_service" - -class ::Google::Cloud::Dataplex::V1::DataScanService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb deleted file mode 100644 index 38f511b8ed94..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/data_scan_service" - -class ::Google::Cloud::Dataplex::V1::DataScanService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_data_scan_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_scan_path project: "value0", location: "value1", dataScan: "value2" - assert_equal "projects/value0/locations/value1/dataScans/value2", path - end - end - - def test_data_scan_job_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_scan_job_path project: "value0", location: "value1", dataScan: "value2", job: "value3" - assert_equal "projects/value0/locations/value1/dataScans/value2/jobs/value3", path - end - end - - def test_entity_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entity_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb deleted file mode 100644 index d11b709f1ce5..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb +++ /dev/null @@ -1,591 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/dataplex/v1/datascans_pb" -require "google/cloud/dataplex/v1/data_scan_service/rest" - - -class ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_data_scan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_scan = {} - data_scan_id = "hello world" - validate_only = true - - create_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_create_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_scan parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_scan ::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_scan(::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_scan_client_stub.call_count - end - end - end - - def test_update_data_scan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_scan = {} - update_mask = {} - validate_only = true - - update_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_update_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_scan data_scan: data_scan, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_scan ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_scan(::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_scan_client_stub.call_count - end - end - end - - def test_delete_data_scan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_delete_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_scan({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_scan name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_scan ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_scan({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_scan(::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_scan_client_stub.call_count - end - end - end - - def test_get_data_scan - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataScan.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DATA_SCAN_VIEW_UNSPECIFIED - - get_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_get_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_scan({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_scan name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_scan ::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_scan({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_scan(::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_scan_client_stub.call_count - end - end - end - - def test_list_data_scans - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_scans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_list_data_scans_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_scans_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_scans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_scans ::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_scans(::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_scans_client_stub.call_count - end - end - end - - def test_run_data_scan - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - run_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_run_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_data_scan({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.run_data_scan name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.run_data_scan ::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.run_data_scan({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.run_data_scan(::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_data_scan_client_stub.call_count - end - end - end - - def test_get_data_scan_job - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataScanJob.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DATA_SCAN_JOB_VIEW_UNSPECIFIED - - get_data_scan_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_get_data_scan_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_scan_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_scan_job({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_scan_job name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_scan_job ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_scan_job({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_scan_job(::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_scan_job_client_stub.call_count - end - end - end - - def test_list_data_scan_jobs - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_data_scan_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_list_data_scan_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_scan_jobs_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_scan_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_scan_jobs ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_scan_jobs(::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_scan_jobs_client_stub.call_count - end - end - end - - def test_generate_data_quality_rules - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - generate_data_quality_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.stub :transcode_generate_data_quality_rules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_data_quality_rules_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_data_quality_rules({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_data_quality_rules name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_data_quality_rules ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_data_quality_rules({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_data_quality_rules(::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_data_quality_rules_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb deleted file mode 100644 index 392ea73c89c1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb +++ /dev/null @@ -1,665 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/datascans_pb" -require "google/cloud/dataplex/v1/datascans_services_pb" -require "google/cloud/dataplex/v1/data_scan_service" - -class ::Google::Cloud::Dataplex::V1::DataScanService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_data_scan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_scan = {} - data_scan_id = "hello world" - validate_only = true - - create_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataScanRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataScan), request["data_scan"] - assert_equal "hello world", request["data_scan_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_scan parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_scan ::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_scan(::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_scan_client_stub.call_rpc_count - end - end - - def test_update_data_scan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - data_scan = {} - update_mask = {} - validate_only = true - - update_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataScan), request["data_scan"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_scan data_scan: data_scan, update_mask: update_mask, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_scan ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_scan(::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_scan_client_stub.call_rpc_count - end - end - - def test_delete_data_scan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_scan({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_scan name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_scan ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_scan({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_scan(::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_scan_client_stub.call_rpc_count - end - end - - def test_get_data_scan - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataScan.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DATA_SCAN_VIEW_UNSPECIFIED - - get_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataScanRequest, request - assert_equal "hello world", request["name"] - assert_equal :DATA_SCAN_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_scan({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_scan name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_scan ::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_scan({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_scan(::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_scan_client_stub.call_rpc_count - end - end - - def test_list_data_scans - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_scans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_scans, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataScansRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_scans_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_scans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_scans ::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_scans(::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_scans_client_stub.call_rpc_count - end - end - - def test_run_data_scan - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - run_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::RunDataScanRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_data_scan({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.run_data_scan name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.run_data_scan ::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.run_data_scan({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.run_data_scan(::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_data_scan_client_stub.call_rpc_count - end - end - - def test_get_data_scan_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataScanJob.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DATA_SCAN_JOB_VIEW_UNSPECIFIED - - get_data_scan_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_scan_job, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, request - assert_equal "hello world", request["name"] - assert_equal :DATA_SCAN_JOB_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_scan_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_scan_job({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_scan_job name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_scan_job ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_scan_job({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_scan_job(::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_scan_job_client_stub.call_rpc_count - end - end - - def test_list_data_scan_jobs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_data_scan_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_scan_jobs, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_scan_jobs_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_scan_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_scan_jobs ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_scan_jobs(::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_scan_jobs_client_stub.call_rpc_count - end - end - - def test_generate_data_quality_rules - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - generate_data_quality_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_data_quality_rules, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_data_quality_rules_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_data_quality_rules({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_data_quality_rules name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_data_quality_rules ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_data_quality_rules({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_data_quality_rules(::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_data_quality_rules_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration, config - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb deleted file mode 100644 index 7b371bd9a615..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb +++ /dev/null @@ -1,389 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/data_taxonomy_pb" -require "google/cloud/dataplex/v1/data_taxonomy_services_pb" -require "google/cloud/dataplex/v1/data_taxonomy_service" - -class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb deleted file mode 100644 index c0e783bf9bf9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/data_taxonomy_service" - -class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_data_attribute_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_attribute_path project: "value0", location: "value1", dataTaxonomy: "value2", data_attribute_id: "value3" - assert_equal "projects/value0/locations/value1/dataTaxonomies/value2/attributes/value3", path - end - end - - def test_data_attribute_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_attribute_binding_path project: "value0", location: "value1", data_attribute_binding_id: "value2" - assert_equal "projects/value0/locations/value1/dataAttributeBindings/value2", path - end - end - - def test_data_taxonomy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_taxonomy_path project: "value0", location: "value1", data_taxonomy_id: "value2" - assert_equal "projects/value0/locations/value1/dataTaxonomies/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb deleted file mode 100644 index d010c1dfc5c8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb +++ /dev/null @@ -1,931 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/dataplex/v1/data_taxonomy_pb" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest" - - -class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_data_taxonomy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_taxonomy_id = "hello world" - data_taxonomy = {} - validate_only = true - - create_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_taxonomy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_taxonomy parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_taxonomy ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_taxonomy(::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_taxonomy_client_stub.call_count - end - end - end - - def test_update_data_taxonomy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_taxonomy = {} - validate_only = true - - update_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_taxonomy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_taxonomy update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_taxonomy ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_taxonomy(::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_taxonomy_client_stub.call_count - end - end - end - - def test_delete_data_taxonomy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_taxonomy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_taxonomy({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_taxonomy name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_taxonomy ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_taxonomy({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_taxonomy(::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_taxonomy_client_stub.call_count - end - end - end - - def test_list_data_taxonomies - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_taxonomies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_taxonomies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_taxonomies_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_taxonomies parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_taxonomies ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_taxonomies(::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_taxonomies_client_stub.call_count - end - end - end - - def test_get_data_taxonomy - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataTaxonomy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_taxonomy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_taxonomy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_taxonomy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_taxonomy ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_taxonomy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_taxonomy(::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_taxonomy_client_stub.call_count - end - end - end - - def test_create_data_attribute_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_attribute_binding_id = "hello world" - data_attribute_binding = {} - validate_only = true - - create_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_attribute_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_attribute_binding parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_attribute_binding ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_attribute_binding(::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_attribute_binding_client_stub.call_count - end - end - end - - def test_update_data_attribute_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_attribute_binding = {} - validate_only = true - - update_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_attribute_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_attribute_binding update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_attribute_binding ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_attribute_binding(::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_attribute_binding_client_stub.call_count - end - end - end - - def test_delete_data_attribute_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_attribute_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_attribute_binding({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_attribute_binding name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_attribute_binding ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_attribute_binding({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_attribute_binding(::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_attribute_binding_client_stub.call_count - end - end - end - - def test_list_data_attribute_bindings - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_attribute_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_attribute_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_attribute_bindings_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_attribute_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_attribute_bindings ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_attribute_bindings(::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_attribute_bindings_client_stub.call_count - end - end - end - - def test_get_data_attribute_binding - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_attribute_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_attribute_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_attribute_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_attribute_binding ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_attribute_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_attribute_binding(::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_attribute_binding_client_stub.call_count - end - end - end - - def test_create_data_attribute - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_attribute_id = "hello world" - data_attribute = {} - validate_only = true - - create_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_attribute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_attribute parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_attribute ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_attribute(::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_attribute_client_stub.call_count - end - end - end - - def test_update_data_attribute - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_attribute = {} - validate_only = true - - update_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_attribute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_attribute update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_attribute ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_attribute(::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_attribute_client_stub.call_count - end - end - end - - def test_delete_data_attribute - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_attribute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_attribute({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_attribute name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_attribute ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_attribute({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_attribute(::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_attribute_client_stub.call_count - end - end - end - - def test_list_data_attributes - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_attributes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_attributes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_attributes_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_attributes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_attributes ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_attributes(::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_attributes_client_stub.call_count - end - end - end - - def test_get_data_attribute - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataAttribute.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_attribute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_attribute({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_attribute name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_attribute ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_attribute({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_attribute(::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_attribute_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb deleted file mode 100644 index 0a264bcd0072..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb +++ /dev/null @@ -1,1080 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/data_taxonomy_pb" -require "google/cloud/dataplex/v1/data_taxonomy_services_pb" -require "google/cloud/dataplex/v1/data_taxonomy_service" - -class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_data_taxonomy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_taxonomy_id = "hello world" - data_taxonomy = {} - validate_only = true - - create_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_taxonomy, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["data_taxonomy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataTaxonomy), request["data_taxonomy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_taxonomy parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_taxonomy ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_taxonomy(::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_taxonomy_client_stub.call_rpc_count - end - end - - def test_update_data_taxonomy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_taxonomy = {} - validate_only = true - - update_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_taxonomy, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataTaxonomy), request["data_taxonomy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_taxonomy update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_taxonomy ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_taxonomy(::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_taxonomy_client_stub.call_rpc_count - end - end - - def test_delete_data_taxonomy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_taxonomy, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_taxonomy({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_taxonomy name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_taxonomy ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_taxonomy({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_taxonomy(::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_taxonomy_client_stub.call_rpc_count - end - end - - def test_list_data_taxonomies - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_taxonomies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_taxonomies, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_taxonomies_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_taxonomies parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_taxonomies ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_taxonomies(::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_taxonomies_client_stub.call_rpc_count - end - end - - def test_get_data_taxonomy - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataTaxonomy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_taxonomy, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_taxonomy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_taxonomy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_taxonomy ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_taxonomy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_taxonomy(::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_taxonomy_client_stub.call_rpc_count - end - end - - def test_create_data_attribute_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_attribute_binding_id = "hello world" - data_attribute_binding = {} - validate_only = true - - create_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_attribute_binding, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["data_attribute_binding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttributeBinding), request["data_attribute_binding"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_attribute_binding parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_attribute_binding ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_attribute_binding(::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_attribute_binding_client_stub.call_rpc_count - end - end - - def test_update_data_attribute_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_attribute_binding = {} - validate_only = true - - update_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_attribute_binding, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttributeBinding), request["data_attribute_binding"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_attribute_binding update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_attribute_binding ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_attribute_binding(::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_attribute_binding_client_stub.call_rpc_count - end - end - - def test_delete_data_attribute_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_attribute_binding, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_attribute_binding({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_attribute_binding name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_attribute_binding ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_attribute_binding({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_attribute_binding(::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_attribute_binding_client_stub.call_rpc_count - end - end - - def test_list_data_attribute_bindings - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_attribute_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_attribute_bindings, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_attribute_bindings_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_attribute_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_attribute_bindings ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_attribute_bindings(::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_attribute_bindings_client_stub.call_rpc_count - end - end - - def test_get_data_attribute_binding - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_attribute_binding, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_attribute_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_attribute_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_attribute_binding ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_attribute_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_attribute_binding(::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_attribute_binding_client_stub.call_rpc_count - end - end - - def test_create_data_attribute - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_attribute_id = "hello world" - data_attribute = {} - validate_only = true - - create_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_attribute, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["data_attribute_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttribute), request["data_attribute"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_attribute parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_attribute ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_attribute(::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_attribute_client_stub.call_rpc_count - end - end - - def test_update_data_attribute - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_attribute = {} - validate_only = true - - update_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_attribute, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttribute), request["data_attribute"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_attribute update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_attribute ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_attribute(::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_attribute_client_stub.call_rpc_count - end - end - - def test_delete_data_attribute - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_attribute, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_attribute({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_attribute name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_attribute ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_attribute({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_attribute(::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_attribute_client_stub.call_rpc_count - end - end - - def test_list_data_attributes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_attributes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_attributes, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_attributes_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_attributes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_attributes ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_attributes(::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_attributes_client_stub.call_rpc_count - end - end - - def test_get_data_attribute - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataAttribute.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_attribute, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_attribute({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_attribute name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_attribute ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_attribute({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_attribute(::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_attribute_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration, config - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb deleted file mode 100644 index 99f73b424fa1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb +++ /dev/null @@ -1,389 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/service_pb" -require "google/cloud/dataplex/v1/service_services_pb" -require "google/cloud/dataplex/v1/dataplex_service" - -class ::Google::Cloud::Dataplex::V1::DataplexService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb deleted file mode 100644 index 24b850eb7d98..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb +++ /dev/null @@ -1,119 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/dataplex_service" - -class ::Google::Cloud::Dataplex::V1::DataplexService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_asset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.asset_path project: "value0", location: "value1", lake: "value2", zone: "value3", asset: "value4" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/assets/value4", path - end - end - - def test_environment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.environment_path project: "value0", location: "value1", lake: "value2", environment: "value3" - assert_equal "projects/value0/locations/value1/lakes/value2/environments/value3", path - end - end - - def test_job_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.job_path project: "value0", location: "value1", lake: "value2", task: "value3", job: "value4" - assert_equal "projects/value0/locations/value1/lakes/value2/tasks/value3/jobs/value4", path - end - end - - def test_lake_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lake_path project: "value0", location: "value1", lake: "value2" - assert_equal "projects/value0/locations/value1/lakes/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_task_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_path project: "value0", location: "value1", lake: "value2", task: "value3" - assert_equal "projects/value0/locations/value1/lakes/value2/tasks/value3", path - end - end - - def test_zone_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.zone_path project: "value0", location: "value1", lake: "value2", zone: "value3" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb deleted file mode 100644 index c4dee6bbd6ed..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb +++ /dev/null @@ -1,1931 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/dataplex/v1/service_pb" -require "google/cloud/dataplex/v1/dataplex_service/rest" - - -class ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_lake - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lake_id = "hello world" - lake = {} - validate_only = true - - create_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_lake_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_lake parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_lake ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_lake(::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_lake_client_stub.call_count - end - end - end - - def test_update_lake - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - lake = {} - validate_only = true - - update_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_lake_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_lake update_mask: update_mask, lake: lake, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_lake ::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_lake(::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_lake_client_stub.call_count - end - end - end - - def test_delete_lake - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_lake_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_lake({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_lake name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_lake ::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_lake({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_lake(::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_lake_client_stub.call_count - end - end - end - - def test_list_lakes - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListLakesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_lakes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_lakes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lakes_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_lakes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_lakes ::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_lakes(::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_lakes_client_stub.call_count - end - end - end - - def test_get_lake - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Lake.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_lake_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_lake({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_lake name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_lake ::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_lake({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_lake(::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lake_client_stub.call_count - end - end - end - - def test_list_lake_actions - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_lake_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_lake_actions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lake_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_lake_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_lake_actions ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_lake_actions(::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_lake_actions_client_stub.call_count - end - end - end - - def test_create_zone - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - zone_id = "hello world" - zone = {} - validate_only = true - - create_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_zone parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_zone ::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_zone(::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_zone_client_stub.call_count - end - end - end - - def test_update_zone - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - zone = {} - validate_only = true - - update_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_zone update_mask: update_mask, zone: zone, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_zone ::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_zone(::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_zone_client_stub.call_count - end - end - end - - def test_delete_zone - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_zone({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_zone name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_zone ::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_zone({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_zone(::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_zone_client_stub.call_count - end - end - end - - def test_list_zones - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListZonesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_zones_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_zones_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_zones_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_zones parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_zones ::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_zones(::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_zones_client_stub.call_count - end - end - end - - def test_get_zone - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Zone.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_zone({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_zone name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_zone ::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_zone({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_zone(::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_zone_client_stub.call_count - end - end - end - - def test_list_zone_actions - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_zone_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_zone_actions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_zone_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_zone_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_zone_actions ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_zone_actions(::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_zone_actions_client_stub.call_count - end - end - end - - def test_create_asset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - asset_id = "hello world" - asset = {} - validate_only = true - - create_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_asset parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_asset ::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_asset(::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_asset_client_stub.call_count - end - end - end - - def test_update_asset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - asset = {} - validate_only = true - - update_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_asset update_mask: update_mask, asset: asset, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_asset ::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_asset(::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_asset_client_stub.call_count - end - end - end - - def test_delete_asset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_asset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_asset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_asset ::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_asset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_asset(::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_asset_client_stub.call_count - end - end - end - - def test_list_assets - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_assets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_assets ::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_assets(::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_count - end - end - end - - def test_get_asset - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Asset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_asset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_asset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_asset ::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_asset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_asset(::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_asset_client_stub.call_count - end - end - end - - def test_list_asset_actions - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_asset_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_asset_actions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_asset_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_asset_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_asset_actions ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_asset_actions(::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_asset_actions_client_stub.call_count - end - end - end - - def test_create_task - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - task_id = "hello world" - task = {} - validate_only = true - - create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_task parent: parent, task_id: task_id, task: task, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_task ::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_task(::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_count - end - end - end - - def test_update_task - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - task = {} - validate_only = true - - update_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_task update_mask: update_mask, task: task, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_task ::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_task(::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_task_client_stub.call_count - end - end - end - - def test_delete_task - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_task({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_task name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_task ::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_task({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_task(::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_task_client_stub.call_count - end - end - end - - def test_list_tasks - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListTasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_tasks parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_tasks ::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_tasks(::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_tasks_client_stub.call_count - end - end - end - - def test_get_task - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_task({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_task name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_task ::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_task({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_task(::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_count - end - end - end - - def test_list_jobs - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListJobsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_jobs_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_jobs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_jobs ::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_jobs(::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_jobs_client_stub.call_count - end - end - end - - def test_run_task - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::RunTaskResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - labels = {} - args = {} - - run_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_run_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_task({ name: name, labels: labels, args: args }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.run_task name: name, labels: labels, args: args do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.run_task ::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.run_task({ name: name, labels: labels, args: args }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.run_task(::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_task_client_stub.call_count - end - end - end - - def test_get_job - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Job.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_job ::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_job(::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_job_client_stub.call_count - end - end - end - - def test_cancel_job - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_cancel_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, cancel_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.cancel_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.cancel_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.cancel_job ::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.cancel_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.cancel_job(::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, cancel_job_client_stub.call_count - end - end - end - - def test_create_environment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - environment_id = "hello world" - environment = {} - validate_only = true - - create_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_create_environment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_environment parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_environment ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_environment(::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_environment_client_stub.call_count - end - end - end - - def test_update_environment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - environment = {} - validate_only = true - - update_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_update_environment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_environment update_mask: update_mask, environment: environment, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_environment ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_environment(::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_environment_client_stub.call_count - end - end - end - - def test_delete_environment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_delete_environment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_environment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_environment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_environment ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_environment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_environment(::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_environment_client_stub.call_count - end - end - end - - def test_list_environments - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_environments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_environments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_environments_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_environments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_environments ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_environments(::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_environments_client_stub.call_count - end - end - end - - def test_get_environment - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Environment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_get_environment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_environment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_environment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_environment ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_environment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_environment(::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_environment_client_stub.call_count - end - end - end - - def test_list_sessions - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListSessionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_sessions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.stub :transcode_list_sessions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_sessions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_sessions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_sessions ::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_sessions(::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_sessions_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb deleted file mode 100644 index 7c667d2e90a4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb +++ /dev/null @@ -1,2245 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/service_pb" -require "google/cloud/dataplex/v1/service_services_pb" -require "google/cloud/dataplex/v1/dataplex_service" - -class ::Google::Cloud::Dataplex::V1::DataplexService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_lake - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lake_id = "hello world" - lake = {} - validate_only = true - - create_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_lake, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateLakeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["lake_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Lake), request["lake"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_lake parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_lake ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_lake(::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_lake_client_stub.call_rpc_count - end - end - - def test_update_lake - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - lake = {} - validate_only = true - - update_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_lake, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateLakeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Lake), request["lake"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_lake update_mask: update_mask, lake: lake, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_lake ::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_lake(::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_lake_client_stub.call_rpc_count - end - end - - def test_delete_lake - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_lake, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteLakeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_lake({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_lake name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_lake ::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_lake({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_lake(::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_lake_client_stub.call_rpc_count - end - end - - def test_list_lakes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListLakesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_lakes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lakes, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListLakesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_lakes_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_lakes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_lakes ::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_lakes(::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_lakes_client_stub.call_rpc_count - end - end - - def test_get_lake - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Lake.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lake, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetLakeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_lake({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_lake name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_lake ::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_lake({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_lake(::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_lake_client_stub.call_rpc_count - end - end - - def test_list_lake_actions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_lake_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lake_actions, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_lake_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_lake_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_lake_actions ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_lake_actions(::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_lake_actions_client_stub.call_rpc_count - end - end - - def test_create_zone - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - zone_id = "hello world" - zone = {} - validate_only = true - - create_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_zone, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateZoneRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["zone_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Zone), request["zone"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_zone parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_zone ::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_zone(::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_zone_client_stub.call_rpc_count - end - end - - def test_update_zone - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - zone = {} - validate_only = true - - update_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_zone, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateZoneRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Zone), request["zone"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_zone update_mask: update_mask, zone: zone, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_zone ::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_zone(::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_zone_client_stub.call_rpc_count - end - end - - def test_delete_zone - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_zone, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteZoneRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_zone({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_zone name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_zone ::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_zone({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_zone(::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_zone_client_stub.call_rpc_count - end - end - - def test_list_zones - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListZonesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_zones_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_zones, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListZonesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_zones_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_zones parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_zones ::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_zones(::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_zones_client_stub.call_rpc_count - end - end - - def test_get_zone - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Zone.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_zone, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetZoneRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_zone({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_zone name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_zone ::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_zone({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_zone(::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_zone_client_stub.call_rpc_count - end - end - - def test_list_zone_actions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_zone_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_zone_actions, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_zone_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_zone_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_zone_actions ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_zone_actions(::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_zone_actions_client_stub.call_rpc_count - end - end - - def test_create_asset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - asset_id = "hello world" - asset = {} - validate_only = true - - create_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_asset, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateAssetRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["asset_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Asset), request["asset"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_asset parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_asset ::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_asset(::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_asset_client_stub.call_rpc_count - end - end - - def test_update_asset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - asset = {} - validate_only = true - - update_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_asset, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateAssetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Asset), request["asset"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_asset update_mask: update_mask, asset: asset, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_asset ::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_asset(::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_asset_client_stub.call_rpc_count - end - end - - def test_delete_asset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_asset, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteAssetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_asset({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_asset name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_asset ::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_asset({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_asset(::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_asset_client_stub.call_rpc_count - end - end - - def test_list_assets - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_assets, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListAssetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_assets_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_assets ::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_assets(::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_rpc_count - end - end - - def test_get_asset - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Asset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_asset, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetAssetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_asset({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_asset name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_asset ::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_asset({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_asset(::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_asset_client_stub.call_rpc_count - end - end - - def test_list_asset_actions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_asset_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_asset_actions, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_asset_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_asset_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_asset_actions ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_asset_actions(::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_asset_actions_client_stub.call_rpc_count - end - end - - def test_create_task - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - task_id = "hello world" - task = {} - validate_only = true - - create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateTaskRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["task_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Task), request["task"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_task parent: parent, task_id: task_id, task: task, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_task ::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_task(::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_rpc_count - end - end - - def test_update_task - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - task = {} - validate_only = true - - update_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Task), request["task"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_task update_mask: update_mask, task: task, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_task ::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_task(::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_task_client_stub.call_rpc_count - end - end - - def test_delete_task - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteTaskRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_task({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_task name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_task ::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_task({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_task(::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_task_client_stub.call_rpc_count - end - end - - def test_list_tasks - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tasks, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListTasksRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_tasks parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_tasks ::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_tasks(::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_tasks_client_stub.call_rpc_count - end - end - - def test_get_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetTaskRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_task({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_task name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_task ::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_task({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_task(::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_rpc_count - end - end - - def test_list_jobs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListJobsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_jobs, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListJobsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_jobs_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_jobs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_jobs ::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_jobs(::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_jobs_client_stub.call_rpc_count - end - end - - def test_run_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::RunTaskResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - labels = {} - args = {} - - run_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::RunTaskRequest, request - assert_equal "hello world", request["name"] - assert_equal({}, request["labels"].to_h) - assert_equal({}, request["args"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_task({ name: name, labels: labels, args: args }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.run_task name: name, labels: labels, args: args do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.run_task ::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.run_task({ name: name, labels: labels, args: args }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.run_task(::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_task_client_stub.call_rpc_count - end - end - - def test_get_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Job.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_job, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_job ::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_job(::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_job_client_stub.call_rpc_count - end - end - - def test_cancel_job - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_job, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CancelJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_job ::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_job(::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_job_client_stub.call_rpc_count - end - end - - def test_create_environment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - environment_id = "hello world" - environment = {} - validate_only = true - - create_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_environment, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["environment_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Environment), request["environment"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_environment parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_environment ::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_environment({ parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_environment(::Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new(parent: parent, environment_id: environment_id, environment: environment, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_environment_client_stub.call_rpc_count - end - end - - def test_update_environment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - environment = {} - validate_only = true - - update_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_environment, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Environment), request["environment"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_environment update_mask: update_mask, environment: environment, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_environment ::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_environment({ update_mask: update_mask, environment: environment, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_environment(::Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new(update_mask: update_mask, environment: environment, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_environment_client_stub.call_rpc_count - end - end - - def test_delete_environment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_environment, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_environment({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_environment name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_environment ::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_environment({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_environment(::Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_environment_client_stub.call_rpc_count - end - end - - def test_list_environments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_environments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_environments, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_environments_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_environments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_environments ::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_environments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_environments(::Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_environments_client_stub.call_rpc_count - end - end - - def test_get_environment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Environment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_environment, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_environment_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_environment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_environment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_environment ::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_environment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_environment(::Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_environment_client_stub.call_rpc_count - end - end - - def test_list_sessions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListSessionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_sessions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sessions, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListSessionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_sessions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_sessions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_sessions ::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_sessions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_sessions(::Google::Cloud::Dataplex::V1::ListSessionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_sessions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration, config - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb deleted file mode 100644 index 6d103094c6ef..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/metadata_service" - -class ::Google::Cloud::Dataplex::V1::MetadataService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_entity_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entity_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4", path - end - end - - def test_partition_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.partition_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4", partition: "value5" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4/partitions/value5", path - end - end - - def test_zone_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.zone_path project: "value0", location: "value1", lake: "value2", zone: "value3" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb deleted file mode 100644 index f39b65a77194..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb +++ /dev/null @@ -1,592 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/dataplex/v1/metadata_pb" -require "google/cloud/dataplex/v1/metadata_service/rest" - - -class ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {} - make_http_request :get, uri: uri, body: nil, params: params, options: options - end - - def make_delete_request uri:, params: {}, options: {} - make_http_request :delete, uri: uri, body: nil, params: params, options: options - end - - def make_post_request uri:, body: nil, params: {}, options: {} - make_http_request :post, uri: uri, body: body, params: params, options: options - end - - def make_patch_request uri:, body:, params: {}, options: {} - make_http_request :patch, uri: uri, body: body, params: params, options: options - end - - def make_put_request uri:, body:, params: {}, options: {} - make_http_request :put, uri: uri, body: body, params: params, options: options - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_entity - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entity = {} - validate_only = true - - create_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_create_entity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_entity parent: parent, entity: entity, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_entity ::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_entity(::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_entity_client_stub.call_count - end - end - end - - def test_update_entity - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - entity = {} - validate_only = true - - update_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_update_entity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_entity({ entity: entity, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_entity entity: entity, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_entity ::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_entity({ entity: entity, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_entity(::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_entity_client_stub.call_count - end - end - end - - def test_delete_entity - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_delete_entity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_entity({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_entity name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_entity ::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_entity({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_entity(::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_entity_client_stub.call_count - end - end - end - - def test_get_entity - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTITY_VIEW_UNSPECIFIED - - get_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_get_entity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_entity({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_entity name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_entity ::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_entity({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_entity(::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_entity_client_stub.call_count - end - end - end - - def test_list_entities - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - view = :ENTITY_VIEW_UNSPECIFIED - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_entities_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_list_entities_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_entities_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_entities parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_entities ::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_entities(::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_entities_client_stub.call_count - end - end - end - - def test_create_partition - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Partition.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - partition = {} - validate_only = true - - create_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_create_partition_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_partition parent: parent, partition: partition, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_partition ::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_partition(::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_partition_client_stub.call_count - end - end - end - - def test_delete_partition - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_delete_partition_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_partition({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_partition name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_partition ::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_partition({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_partition(::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_partition_client_stub.call_count - end - end - end - - def test_get_partition - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Partition.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_get_partition_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_partition({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_partition name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_partition ::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_partition({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_partition(::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_partition_client_stub.call_count - end - end - end - - def test_list_partitions - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_partitions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.stub :transcode_list_partitions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_partitions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_partitions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_partitions ::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_partitions(::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_partitions_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb deleted file mode 100644 index 7a3016ddfe7f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb +++ /dev/null @@ -1,638 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/dataplex/v1/metadata_pb" -require "google/cloud/dataplex/v1/metadata_services_pb" -require "google/cloud/dataplex/v1/metadata_service" - -class ::Google::Cloud::Dataplex::V1::MetadataService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - end - - def test_create_entity - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entity = {} - validate_only = true - - create_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_entity, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntityRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entity), request["entity"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_entity parent: parent, entity: entity, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_entity ::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_entity(::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_entity_client_stub.call_rpc_count - end - end - - def test_update_entity - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - entity = {} - validate_only = true - - update_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_entity, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntityRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entity), request["entity"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_entity({ entity: entity, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_entity entity: entity, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_entity ::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_entity({ entity: entity, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_entity(::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_entity_client_stub.call_rpc_count - end - end - - def test_delete_entity - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_entity, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntityRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_entity({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_entity name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_entity ::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_entity({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_entity(::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_entity_client_stub.call_rpc_count - end - end - - def test_get_entity - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTITY_VIEW_UNSPECIFIED - - get_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_entity, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntityRequest, request - assert_equal "hello world", request["name"] - assert_equal :ENTITY_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_entity({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_entity name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_entity ::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_entity({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_entity(::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_entity_client_stub.call_rpc_count - end - end - - def test_list_entities - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - view = :ENTITY_VIEW_UNSPECIFIED - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_entities_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_entities, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntitiesRequest, request - assert_equal "hello world", request["parent"] - assert_equal :ENTITY_VIEW_UNSPECIFIED, request["view"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_entities_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_entities parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_entities ::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_entities(::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_entities_client_stub.call_rpc_count - end - end - - def test_create_partition - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Partition.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - partition = {} - validate_only = true - - create_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_partition, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreatePartitionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Partition), request["partition"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_partition parent: parent, partition: partition, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_partition ::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_partition(::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_partition_client_stub.call_rpc_count - end - end - - def test_delete_partition - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_partition, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeletePartitionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_partition({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_partition name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_partition ::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_partition({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_partition(::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_partition_client_stub.call_rpc_count - end - end - - def test_get_partition - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Partition.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_partition, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetPartitionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_partition({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_partition name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_partition ::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_partition({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_partition(::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_partition_client_stub.call_rpc_count - end - end - - def test_list_partitions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_partitions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_partitions, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListPartitionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_partitions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_partitions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_partitions ::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_partitions(::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_partitions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::MetadataService::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb deleted file mode 100644 index 48407bca7edb..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct"